User:FM~enwiki/monobook.js

// Author: Filemon

function addEdit { if (prevlink = document.getElementById('differences-prevlink')) { otitle = prevlink.parentNode; br = otitle.childNodes[1]; pipe = document.createTextNode(' | '); otitle.insertBefore(pipe,br); a = document.createElement('a'); otitle.insertBefore(a,br); txt = document.createTextNode('edit'); a.appendChild(txt); oldhref = otitle.firstChild.firstChild.getAttribute('href'); a.setAttribute('href',oldhref+'&action=edit'); } } window.addEventListener('load',addEdit,false);