MediaWiki:Common.js: Difference between revisions

m
Well, hopefully this won't go sour & explode in anyone's face.
m (Undo revision 693713 by Jioruji Derako (Talk) another dead one, it seems.)
m (Well, hopefully this won't go sour & explode in anyone's face.)
Line 145: Line 145:
updateClocks();
updateClocks();
}
}
// This will add an [edit] link at the top of all pages except preview pages and the main page
// by User:Pile0nades (blatantly stolen from Wikipedia by User:The dark lord trombonator
// Add an [edit] link to pages
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;
};


/* </pre> */
/* </pre> */