User:Zarius/monobook.js

From Wikipedia, the free encyclopedia

If a message on your talk page led you here, please be wary of who left it. The code below could contain malicious content capable of compromising your account; if your account appears to be compromised, it will be blocked. If you are unsure whether the code is safe, you can ask at the appropriate village pump.
Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.
// [[Wikipedia:Tools/Navigation popups]] - [[User:Lupin/popups.js]] 
// * Don't know how I did without this: adds a small popup when hovering over wikilinks that shows the intro paragraph of the relevant article<pre><nowiki>  
 
importScript('User:Lupin/popups.js');
 
//</nowiki></pre><br/>
 
// [[User:Dschwen/WikiMiniAtlas]] - [[User:Dschwen/wikiminiatlas2.js]] - please include this line
// * Adds a minimap to all [[geocode]]d articles with links on the map to other articles <pre><nowiki>
document.write('<script type="text/javascript" src="' 
     + 'http://en.wikipedia.org/w/index.php?title=User:Dschwen/wikiminiatlas2.js' 
     + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
//</nowiki></pre><br/>
 
//[[User:Zocky/Picture Popups]] - [[User:Zocky/PicturePopups.js]] <pre><nowiki>  
 
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Zocky/PicturePopups.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
//</nowiki></pre><br/>
 
// [[User:Cacycle/wikEd]] in-browser text editor<pre><nowiki>  
 
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
//</nowiki></pre><br/>
 
// [[User:Voice_of_All/UsefulJS]] scripts <pre><nowiki>
//IMPORTS
importScript('User:Voice_of_All/Addtabs/monobook.js');
importScript('User:Voice_of_All/UTCclock.js');
importScript('User:Voice_of_All/Revert.js');
importScript('User:Voice_of_All/History/monobook.js');
 
importScript('User:Lightdarkness/aiv.js');
//</nowiki></pre><br/>
 
// [[User:Lupin/Anti-vandal tool]] - [[User:Lupin/recent2.js]] <pre><nowiki>
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/recent2.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//</nowiki></pre><br/>
 
 
 
//<pre><nowiki>
//Please leave the following line
//[[user:Where/easy db]]
//Start db script
//modded by VoA
addOnloadHook(function()
{
  //check if called from deletion request
  if (document.title.indexOf("Editing ") != -1 && wgNamespaceNumber !=-1)
  {
    if (document.URL.lastIndexOf("&fakeaction=huff") == -1)
      return;
    if (document.URL.lastIndexOf("&reason=off") != -1)
    {
      var type = prompt("Enter criteria for speedy deletion, e.g. A1, G3");
      var f = document.editform, t = f.wpTextbox1;
      t.value = "{{db-" + type.toLowerCase() + "}}\n" + t.value;
      f.wpSummary.value = "JS: Requesting speedy deletion ([[WP:CSD#" + type + "|CSD " + type + "]])";
      f.wpSave.click();
      return;
    }
    else if (document.URL.lastIndexOf("&reason=on") != -1)
    {
      var type = prompt("Enter reason for speedy deletion");
      var f = document.editform, t = f.wpTextbox1;
      t.value = "{{db|" + type + "}}\n" + t.value;
      f.wpSummary.value = "JS: Requesting speedy deletion";
      f.wpSave.click();
      return;
    }
  }
  if (window.location.href.search(/Special:|&action=/) != -1)
    return;
 
  addTab("javascript:easyDb(0)", "db (csd)", "ca-db0", "Request speedy deletion according to WP:CSD", "");
  addTab("javascript:easyDb(1)", "db (reason)", "ca-db0", "Request speedy deletion with reason", "");
});
 
function easyDb(n)
{
  if (n == 0)
  {
    //edit page
    var title = document.title.substr(0, document.title.lastIndexOf(' - Wikipedia, the free'));
    location.assign("/w/index.php?title=" + title + "&action=edit&fakeaction=huff&reason=off");
  }  
 
  if (n == 1)
  {
    //edit page
    var title = document.title.substr(0, document.title.lastIndexOf(' - Wikipedia, the free'));
    location.assign("/w/index.php?title=" + title + "&action=edit&fakeaction=huff&reason=on");
  }
}
//</nowiki></pre>