User:WikiFakah/toolbox2.js

function addToToolbox { if (mw.config.get('wgCanonicalNamespace') != "Special") {

var pTb = document.getElementById("p-tb"); if( !pTb ) return;

var pStats = pTb.cloneNode(true);

pStats.id="p-stats"; pStats.innerHTML = " Statistics  "; pTb.parentNode.insertBefore(pStats, pTb.nextSibling);

mw.util.addPortletLink("p-stats", "http://stats.grok.se/en/latest30/" + encodeURI(mw.config.get('wgPageName')), 'Traffic stats', '', "Traffic to this page in the last month"); } } var skin = mw.config.get('skin'); if( skin == "myskin" || skin == "simple" || skin == "monobook" || skin == "modern" || skin == "chick" || skin == "vector") { $(addToToolbox); }