User:Azliq7/global.js

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ACTIVE SCRIPTS (MONOBOOK) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function addPurgeTab { var hist; var url;

if (!(hist = document.getElementById('ca-history') )) return; if (!(url = hist.getElementsByTagName('a')[0] )) return; if (!(url = url.href )) return;

addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'), 'purge', 'ca-purge', 'Purge server cache for this page', '0'); } if(skin == "monobook") addOnloadHook(addPurgeTab);

/////////////////////////////////////////////// function addWhatLinksHereTab { var wlh; var url;

if (!(wlh = document.getElementById('t-whatlinkshere') )) return; if (!(url = wlh.getElementsByTagName('a')[0] )) return; if (!(url = url.href )) return;

addPortletLink('p-cactions', url, 'what links here', 'ca-whatlinkshere', 'List of all wiki pages that link here'); } if(skin == "monobook") addOnloadHook(addWhatLinksHereTab);

/////////////////////////////////////////////// function addContributionsTab { if (wgCanonicalNamespace == "User") {

var contrib; var url;

if (!(contrib = document.getElementById('t-contributions') )) return; if (!(url = contrib.getElementsByTagName('a')[0] )) return; if (!(url = url.href )) return;

addPortletLink('p-cactions', url, 'contributions', 'ca-usercontibutions', 'View the list of contributions of this user', 'j'); } } if(skin == "monobook") addOnloadHook(addContributionsTab);

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////