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 tab // adds a "marked as patrolled" tab to pages that have that link already on it. // Once patrolled, the button turns into a button to go to the recent changes // with patrolled edits hidden. Further speeding up patrolling. // The second function of the button has the same access key. // function patroltab { if (document.URL.indexOf('&rcid=') > 0 && wgAction != 'markpatrolled') { addPortletLink ('p-cactions', "/index.php?title=" + encodeURIComponent(wgPageName) + "&action=markpatrolled&rcid=" + document.location.toString.split('&rcid=')[1].split('&'), 'patrol', 'ca-patrol', 'Mark as patrolled', '1'); } else if (document.URL.indexOf('&rcid=') > 0 && wgAction == 'markpatrolled') { addPortletLink ('p-cactions', "/index.php?title=Special:RecentChanges&hidepatrolled=1", 'return', 'ca-return', 'Return to unpatrolled recent changes', '1'); } } addOnloadHook(patroltab); //