User:Jerry/quicklinks.js

//Please leave this link: User:Jerry/quicklinks.js //

// Quicklinks // To install this, you can copy it into your monobook.js or use a script-inclusion // method (see WikiProject User Scripts). It produces hypertext anchor links at the // top of pages to purge the current page's cahce, and to several category pages of // particular use to administrators. You can copy this script to your own userspace // modify or remove the quicklinks if you don't like the ones I included. // by User:Jerry

addOnloadHook(function {  // if this is preview page or generated page, stop  if( document.getElementById("wikiPreview") || document.getElementById("histlegend‎") || document.getElementById("difference‎") || document.getElementById("watchdetails") || document.getElementById("ca-viewsource") || window.location.href.indexOf("/wiki/Special:") != -1 ) {   if(window.location.href.indexOf("&action=edit&section=0") != -1) {      document.getElementById("wpSummary").value = "/* Intro */ ";    }    return;  };

// get the page title var pageTitle = wgPageName;

// create div and set innerHTML to link var divContainer2 = document.createElement("div"); divContainer2.innerHTML = ' [purge cache] [WP:UAA] [WP:RFPP] [WP:AIV] [WP:CSD] [WP:SFD] [WP:AN] [Maint] [<a href="http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Old/Open_AfDs?action=purge">WP:AFDO</a>] [<a href="http://tools.wikimedia.de/~agony/orphantalk/index.php?l=en">OrGen</a>] [<a href="http://en.wikipedia.org/wiki/Special:NewPages">New</a>] [<a href="http://en.wikipedia.org/wiki/Wikipedia:WikiProject_Deletion_sorting/Schools?action=purge">School</a>] ';

// insert divContainer2 into the DOM below the h1 if(window.location.href.indexOf("&action=edit") == -1) { document.getElementById("content").insertBefore(divContainer2, document.getElementsByTagName("h1")[0]);

}

});