User:Pat/myskin.js

// This will add an [edit top] link at the top of all pages except preview pages // by User:Pile0nades

setTimeout("editTopLink", 0) // this is equivalent of onload function editTopLink { // if this is preview page or generated page, stop if(document.getElementById("wikiPreview") || window.location.href.indexOf("w/index.php?title=Special:") != -1) return;

// get the page title var pageTitle = document.title.split(" - ")[0].replace(" ", "_");

// create div and set innerHTML to link var divContainer = document.createElement("div"); divContainer.innerHTML = ' edit top m t u ut p pt i it</a> mw</a> mwt</a> t</a> tt</a> h</a> ht</a> c</a> ct</a> b</a> bt</a> f</a> ft</a>';

var divContainer1 = document.createElement("div"); divContainer1.innerHTML = '';

// insert divContainer into the Document Object Model (DOM) before the h1 document.getElementById("content").insertBefore(divContainer, document.getElementsByTagName("h1")[0]);

document.getElementById("p-cactions").insertBefore(divContainer1, document.getElementsByTagName("h5")[0]);

}