Jump to content

User:Amorymeltzer/unhide.js

From Wikipedia, the free encyclopedia
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';
	}
}