Jump to content

User:Mysterytrey/common.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
importScript('User:Cameltrader/Advisor.js');

importScript('user:js/urldecoder.js'); //[[user:js/urldecoder.js]]

importScript('User:NuclearWarfare/Mark-blocked script.js'); //[[User:NuclearWarfare/Mark-blocked script.js]]

importScript('User:Writ Keeper/Scripts/deletionFinder.js'); //[[User:Writ Keeper/Scripts/deletionFinder.js]]

importScript('User:Amalthea/userhighlighter.js'); //[[User:Amalthea/userhighlighter.js]]

importScript('User:Equazcion/SidebarHistoryTools.js'); //[[User:Equazcion/SidebarHistoryTools.js]]

importScript('User:Ais523/watchlistnotifier.js'); //[[User:Ais523/watchlistnotifier.js]]

importScript('User:PleaseStand/userinfo.js'); //[[User:PleaseStand/userinfo.js]]

importScript('User:AWeenieMan/furme.js');

importScript('User:Fox Wilson/delsort.js'); //Deletion sorting script [[WP:FWDS]]

// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

function addToToolbox() {
  if (wgCanonicalNamespace != "Special") {

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

   var escPageName = escape(wgPageName).replace(/\+/g, '%2B').replace(/&/g, '%26').replace(/%u2013/g, '%96');

   now = new Date();
   var month = now.getMonth();
   var thisMonth = (now.getDay() > 6);
   if (thisMonth) month++;
   if (month == 0) var month=12;
   else var month =  ((month <10)?'0':'') + month;
   mw.util.addPortletLink("p-tb", "http://stats.grok.se/en/" + now.getFullYear() + month + "/"+wgPageName, 'Traffic stats', '', "Traffic to this page " + (thisMonth?'this':'last') + " month");
   mw.util.addPortletLink("p-tb", "http://wikidashboard.parc.com/wiki/"+wgPageName, 'Edit history stats', '', "Statistics about the edit history of this page");
   mw.util.addPortletLink("p-tb", "http://tools.wikimedia.de/~verisimilus/Bot/DOI_bot/doibot.php?edit=toolbar&slow=1&user="+wgUserName+"&page="+escPageName, 'ref bot', '', "Add DOIs to citations and fix common formatting errors");

    }
}
$(addToToolbox);

// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

$(function () {

mw.util.addPortletLink( "n-mainpage-description", 
 mw.config.get('wgServer') + mw.config.get('wgScriptPath') + "/index.php?title=WP:NPP#Patroller_checklists",
 "NPP", "pt-npp", "Link to WP:NPP",
 "45", document.getElementById("pt-newpages"));

mw.util.addPortletLink( "n-mainpage-description", 
 mw.config.get('wgServer') + mw.config.get('wgScriptPath') + "/index.php?title=WP:CSD",
 "CSD", "pt-csd", "Link to CSD",
 "82", document.getElementById("pt-newpages"));

});