Wikipedia:WikiProject User scripts/Scripts/Edit Top: Difference between revisions
Content deleted Content added
David Levy (talk | contribs) further tweaking |
David Levy (talk | contribs) another tweak |
||
Line 29:
// Add an [edit] link to pages
addOnloadHook(function () {
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
|