User:Nageh/toolbox.js

/* based on User:Smith609/toolbox.js */

$( function { if (wgCanonicalNamespace != "Special") {    var pTb = document.getElementById("p-tb");    if ( !pTb ) return;

var pStats = pTb.cloneNode(true); pStats.id = "p-stats"; var child = pStats.firstChild; while (child.nodeType == 3) child = child.nextSibling; child.innerHTML = "Statistics"; do { child = child.nextSibling } while (child.nodeType == 3); child.innerHTML = "";

pTb.parentNode.insertBefore(pStats, pTb.nextSibling);

mw.util.addPortletLink("p-stats", "http://stats.grok.se/en/latest30/" + encodeURI(wgPageName), 'Traffic stats', '', "Traffic to this page in the last month"); mw.util.addPortletLink("p-stats", "https://wikidashboard.appspot.com/enwiki/wiki/"+encodeURI(wgPageName), 'Edit history stats', '', "Statistics about the edit history of this page"); mw.util.addPortletLink("p-stats", "http://toolserver.org/~mzmcbride/watcher/?db=enwiki_p&titles="+encodeURIComponent(mw.config.get('wgPageName')), 'Page watchers', "Number of people with this page on their watchlist"); } } );