MediaWiki:Gadget-UncheckFileRedirect.js: Difference between revisions

From RuneRealm Wiki
Jump to navigation Jump to search
Content added Content deleted
(Created page with "→‎* Unchecks redirect checkbox on file pages * Because redirects in file namespace are usually unnecessary: $(function () { 'use strict'; var conf = mw.config.get([ 'wgCanonicalSpecialPageName', 'wgRelevantPageName' ]); $(function () { if (conf.wgCanonicalSpecialPageName === 'Movepage'){ if ((/File:/).test(conf.wgRelevantPageName)){ $('#wpLeaveRedirect > input').removeAttr('checked'); } } }); })")
(No difference)

Revision as of 01:19, 13 October 2024

/*
 * Unchecks redirect checkbox on file pages
 * Because redirects in file namespace are usually unnecessary
 */

$(function () {
	'use strict';
	
	var conf = mw.config.get([
		'wgCanonicalSpecialPageName',
		'wgRelevantPageName'
	]);
	
	$(function () {
		if (conf.wgCanonicalSpecialPageName === 'Movepage'){
			if ((/File:/).test(conf.wgRelevantPageName)){
				$('#wpLeaveRedirect > input').removeAttr('checked');
			}
		}
	});
})