User:Korg/monobook.js
From Wikipedia
Note: After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac); IE: hold Ctrl while clicking Refresh, or press Ctrl-F5; Konqueror:: simply click the Reload button, or press F5; Opera users may need to completely clear their cache in Tools→Preferences.
document.write('<SCRIPT SRC="http://meta.wikimedia.org/w/index.php?title=User:Korg/monobook.js&action=raw&ctype=text/javascript"><\/SCRIPT>'); //----------------------------------------------------------------------------- // addLoadEvent //----------------------------------------------------------------------------- function addLoadEvent(func) { if (window.addEventListener) { window.addEventListener("load", func, false); } else if (window.attachEvent) { window.attachEvent("onload", func); } } function insertAfter(parent, node, referenceNode) { parent.insertBefore(node, referenceNode.nextSibling); } //----------------------------------------------------------------------------- // OngletPurge //----------------------------------------------------------------------------- function OngletPurge() { var a = document.getElementById("p-cactions"); if (a) { var pageName = document.title.replace(" - Wikipedia", ""); b = a.getElementsByTagName("ul"); if(b.length > 0) { b[0].innerHTML = b[0].innerHTML + '<li id="ca-nstab-user">' + '<a href="/w/index.php?action=purge&title=' + pageName + '">purge</a>' + '</li>'; } } } addLoadEvent(OngletPurge);