MediaWiki:Admin.js

/* JavaScript here is intended for use by ZW admins */ // importScript('MediaWiki:admin.js'); //

// // addPortletLinks // Adds the following links: // 'User CSS' which links to the user's personal 'skin'.css page // 'User JS' which links to the user's personal 'skin'.js page // 'Page logs' in the toolbox (doesn't display on special pages) // 'User rights' in the toolbox (only works for admins on User and User talk pages) // addOnloadHook(function {    addPortletLink( "p-personal", "/User:" + encodeURIComponent(wgUserName) + "/" + skin + ".css", "My CSS", "pt-my-css", "", "", "pt-logout" );

addPortletLink( "p-personal",                   "/User:" + encodeURIComponent(wgUserName) + "/" + skin + ".js",                    "My JS", "pt-my-js", "", "", "pt-my-css" ); if ( wgCanonicalNamespace != "Special" ) // don't display link for special pages addPortletLink( "p-tb",                   "/index.php?title=Special:Log&page=" + encodeURIComponent(wgPageName),                    "Page logs", "t-logs");

if (rights_isAdmin && wgNamespaceNumber == "2" && wgNamespaceNumber == "3") addPortletLink( "p-tb",                    "/Special:Userrights/"+wgTitle,                    'User rights', "t-userrights", 'User rights for "'+wgTitle+'"'); }); //

// // Patrol tools // // importScriptURI('http://meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/AjaxPatrolLinks.js&action=raw&ctype=text/javascript');