Difference between revisions of "MediaWiki:Common.js"

From University Innovation Fellows
Jump to navigation Jump to search
m (Hide broken link in 2020 Namespcace)
Line 9: Line 9:
 
 
 
protectedNamespace = [ "2020", "2021", "2022", "2023", "2024", "2025" ];
 
protectedNamespace = [ "2020", "2021", "2022", "2023", "2024", "2025" ];
if ( protectedNamespace,includes( mw.config.get('wgCanonicalNamespace') ) ){
+
if ( protectedNamespace.includes( mw.config.get('wgCanonicalNamespace') ) ){
 
$('#pt-login').hide();
 
$('#pt-login').hide();
 
}
 
}

Revision as of 10:12, 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');