Jump to content

User:Iamunknown/monobook.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Iamunknown (talk | contribs) at 02:53, 2 October 2007 (+popupDebugging (this time in an addOnloadHook + anonymous function)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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:Iamunknown/image-templates.js');
importScript('User:Lupin/popups.js'); // [[User:Lupin/popups.js]] - As I remember, Lupin wanted links to his popups script so that a list could be made of people to contact pending updates
importScript('Wikipedia:WikiProject User scripts/Scripts/Time');
importScript('Wikipedia:WikiProject User scripts/Scripts/Add purge to tabs');

addOnloadHook(function() { newOption('popupDebugging', true); return; });

function stopRedlinksEditing(){ 
    var len=document.links.length;
    for(var i=0; i<len; ++i) {
        var l=document.links[i];
        if (l.className=='new') {
            l.href=l.href.replace('&action=edit', '');
        }
    }
}
addOnloadHook(stopRedlinksEditing);

if (wgNamespaceNumber == 1)
 {
  importScript('User:AndyZ/peerreviewer2.js');
  toolbarLink_PR = true;
 }
else
if (wgNamespaceNumber == 6)
 {
  mwCustomEditButtons[mwCustomEditButtons.length] =
   {
    "imageId":    "mw-editbutton-info", 
    "imageFile":  "/media/wikipedia/commons/thumb/2/21/Info_Sign.svg/23px-Info_Sign.svg.png", 
    "speedTip":   "Information template", 
    "tagOpen":    "", 
    "tagClose":   "", 
    "sampleText": "\n{{Information\n" 
                  + "|Description = \n" 
                  + "|Source      = \n" 
                  + "|Date        = \n" 
                  + "|Author      = \n" 
                  + "|Permission  = \n" 
                  + "|other_versions = \n}}\n"
   };
 }