User:PacWalker/vector.js

function editlead { var header = document.getElementsByTagName('h1'); var headerHTML = header[0].innerHTML; var anchor = document.createElement('a'); anchor.href = "/w/index.php?title=" + wgPageName + "&action=edit&section=0"; anchor.innerHTML = "edit"; var span = document.createElement('span'); span.setAttribute('class', "mw-editsection"); span.appendChild(document.createTextNode("[")); span.appendChild(anchor); span.appendChild(document.createTextNode("]")); header[0].appendChild(span); }

$(editlead);