MediaWiki:Gadget-ForceEditLinks.js

function forceLinksToEdit { var links = document.getElementById('bodyContent').getElementsByTagName('a'); for(var i=0; i<links.length; i++) { if(!links[i].href.match('/w/index.php')) { links[i].href = links[i].href.replace(/(#|$)/, "?action=edit$1"); }   } }

$(forceLinksToEdit);