Wikipedia:WikiProject User scripts/Scripts/Edit Top: Difference between revisions

Content deleted Content added
further tweaking
another tweak
Line 29:
// Add an [edit] link to pages
addOnloadHook(function () {
// if this is preview page or generated page, stop
if(document.getElementById("wikiPreview") || window.___location.href.indexOf("/wiki/Special:") != -1) return;
 
// if this is a revision history, stop
if(document.getElementById("histlegend‎") || window.___location.href.indexOf("/wiki/Special:") != -1) return;
 
// if this is a diff page, stop
if(document.getElementById("difference‎") || window.___location.href.indexOf("/wiki/Special:") != -1) return;
 
// if this is a watchlist, stop
Line 42 ⟶ 45:
 
// get the page title
var pageTitle = document.title.split(" - ")[0].replace(" ", "_");
 
// create div and set innerHTML to link