User:SPQRobin/monobook.js

/* */

/* Contribs & logs tab */

$(function { if (mw.config.get('wgTitle').indexOf("/") != -1 || document.title.indexOf("- History -") != -1)  //no subpages or history     return;  if (mw.config.get('wgCanonicalNamespace') == "User" || mw.config.get('wgCanonicalNamespace') == "User_talk") {     var username = encodeURIComponent( mw.config.get('wgTitle') );     addPortletLink("p-cactions", mw.config.get('wgServer') + "/wiki/Special:Contributions/" + username, "Bijdragen", "ca-contrib", "Bijdragen van deze gebruiker");     addPortletLink("p-cactions", mw.config.get('wgServer') + "/w/index.php?title=Special:Log&page=User:" + username, "Logboeken", "ca-log", "Logboeken van deze gebruiker");  } });

/* Purge tab */

// addPurge $(function {    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 de server cache van deze pagina', '0'); });

/* */