User:WikiFakah/toolbox.js

// if you are using the "expand citations" gadget, then you'll want to install toolbox2.js instead or the links will be duplicated importScript("User:Smith609/citations.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);

var now = new_Date; var month = now.getMonth; var year = now.getFullYear; var thisMonth = (now.getDay > 6); if (thisMonth) month++; if (month == 0) { month = 12; year--; } else month = ((month <10)?'0':'') + month; */ mw.util.addPortletLink("p-stats", "https://tools.wmflabs.org/pageviews/#project=en.wikipedia.org&platform=all-access&agent=user&range=latest-30&pages=" + encodeURI(mw.config.get('wgPageName')), 'Traffic stats', '', "Traffic to this page in the last month"); mw.util.addPortletLink("p-stats", "https://wikidashboard.appspot.com/enwiki/wiki/" + encodeURI(mw.config.get('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"); } } if( $.inArray( mw.config.get( 'skin' ), [ "myskin", "simple" , "monobook" , "modern", "chick" , "vector" ] ) !== -1 ) { $( addToToolbox ); }