Jump to content

User:Amorymeltzer/unhide.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Amorymeltzer (talk | contribs) at 14:41, 11 January 2020 (Repo at 4081a0c: Start managing userscripts in git repo (indent and cleanup whitespace)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//Lame kludge to try and show revdel'd things by default
//Force a reload, which is dumb
//[[phab:T218808]]
if (mw.config.get('wgArticleId') && mw.config.get('wgAction') === 'view' && (mw.util.getParamValue('oldid') || mw.util.getParamValue('diff')) && !mw.util.getParamValue('unhide')) {
    if (!mw.config.get('wgRevisionId') || $('.history-deleted').length) {
	window.location.href = window.location.href + '&unhide=1';
    }
}