Jump to content

User:Derek.cashman/monobook.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.
// [[User:Lupin/popups.js]]

mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');

// [[User:Outriggr/metadatatest.js]] <nowiki>
importScript('User:Outriggr/metadatatest.js'); 
assessmentMyTemplateCode = ["{{WikiProject Pharmacology|class=|importance=}}", "{{WPCities|class=|importance=}}", "{{TemplateC|class=|importance=}}"];
assessmentDefaultProject = "WikiProject Pharmacology";
// </nowiki>

// open external links in new window.
addOnloadHook(function() {
    var alinks = document.getElementsByTagName("a");
    var tablink;
    for (var i = 0, leng = alinks.length; i < leng; i++) {
        tablink = alinks[i];
        if (/\bexternal\b/.test(tablink.className) && tablink.href.indexOf("http://en.wikipedia.org") != 0)
            tablink.target = "_tab";
    }
});

// view user rights on user pages.
addOnloadHook(function(){
  if(wgCanonicalNamespace[0] != 'U') return; t = 'Userrights';
  url = wgScript + '?title=Special:Listusers&limit=1&username=' + wgTitle.replace(/\/.*$/,'');
  r = document.createElement('li'); a = document.createElement("a");
  a.setAttribute("title", t); a.setAttribute("href", url); a.innerHTML = t;
  r.setAttribute('id', 't-' + t); r.appendChild(a);
  u = document.getElementById('t-upload');
  u.parentNode.insertBefore(r, u); 
  });

// display online/offline status.
importScript('User:TheDJ/qui.js');