MediaWiki:Gadget-UncheckFileRedirect.js: Difference between revisions
Jump to navigation
Jump to search
(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 edit summary Tag: Manual revert |
(One intermediate revision by the same user not shown) | |
(No difference)
|
Latest revision as of 17:15, 17 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');
}
}
});
})