|
|
Line 65: |
Line 65: |
| } | | } |
| ); | | ); |
| // Add an [edit] link to pages
| |
| addOnloadHook(function () {
| |
| if(
| |
| // document.getElementById("wikiPreview") ||
| |
| document.getElementById("histlegend") ||
| |
| document.getElementById("difference") ||
| |
| document.getElementById("watchdetails") ||
| |
| document.getElementById("ca-viewsource") ||
| |
| window.location.href.indexOf("/index.php?title=Special:") != -1
| |
| ) {
| |
| if(window.location.href.indexOf("&action=edit§ion=0") != -1) {
| |
| document.getElementById("wpSummary").value = "/* Intro */ ";
| |
| }
| |
| return;
| |
| };
| |
| var pageTitle = wgPageName;
| |
| var divContainer = document.createElement("div");
| |
| divContainer.innerHTML = '<div class="editsection" style="font-family: raleway;color:black;margin: 1em 0 0 0;text-align:right;float:right;">[<a href="/w/index.php?title='+pageTitle+'&action=edit§ion=0" title="Edit section: '+pageTitle+'">Edit top</a>]</div>';
| |
| if(window.location.href.indexOf("&action=edit") == -1) {
| |
| document.getElementById("content").insertBefore(divContainer, document.getElementsByTagName("h1")[0]);
| |
| }
| |
| });
| |