Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Jayprakash (talk | contribs) |
Jayprakash (talk | contribs) m (Hide broken link in 2020 Namespcace) |
||
| Line 7: | Line 7: | ||
// Open all UIF link in new tab | // Open all UIF link in new tab | ||
$('#p-UIF').children().find('a').attr('target', '_blank'); | $('#p-UIF').children().find('a').attr('target', '_blank'); | ||
| + | |||
| + | protectedNamespace = [ "2020", "2021", "2022", "2023", "2024", "2025" ]; | ||
| + | if ( protectedNamespace,includes( mw.config.get('wgCanonicalNamespace') ) ){ | ||
| + | $('#pt-login').hide(); | ||
| + | } | ||
}); | }); | ||
Revision as of 10:10, 14 February 2020
$( document ).ready( function(){
if( mw.config.get('wgIsMainPage') )
{
$('#sbl-breadcrumbs').remove();
}
// Open all UIF link in new tab
$('#p-UIF').children().find('a').attr('target', '_blank');
protectedNamespace = [ "2020", "2021", "2022", "2023", "2024", "2025" ];
if ( protectedNamespace,includes( mw.config.get('wgCanonicalNamespace') ) ){
$('#pt-login').hide();
}
});
// Gadget-HotCat
mw.loader.load( '/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' );
// Gadget - QRCode
mw.loader.load('/index.php?title=MediaWiki:QRCode.js&action=raw&ctype=text/javascript');