Open main menu

Changes

MediaWiki:Common.js

310 bytes added, 5 years ago
no edit summary
// Open all UIF link in new tab
$('#p-UIF').children().find('a').attr('target', '_blank');
  // Hide login link from nav
if ( mw.config.get( 'wgPageName' ) === "Special:Badtitle" ){
$('#pt-login').hide();
}
// Remove the navigation from Training namespaces
if( mw.config.get("wgCanonicalNamespace") === "Training" && !(mw.config.get( 'wgUserGroups' ).indexOf("bureaucrat") !== -1) ) {
$("#left-navigation").empty();
$("#right-navigation").empty();
}
 
// Redirect Topic page to their parent pages
if( mw.config.get( 'wgNamespaceNumber') === mw.config.get( 'wgNamespaceIds' ).topic ){
location.replace( mw.config.get( 'wgServer') + $("#contentSub").children().attr("href") );
}