User:בונגולים/monobook.js
From Wikipedia
< User:בונגולים
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.
/* Credit: [[commons:User:Alphax/monobook.js]]<pre><nowiki> */ /** * Initialises function loading on page load */ if (window.addEventListener) window.addEventListener("load",myLoadFuncs,false); else if (window.attachEvent) window.attachEvent("onload",myLoadFuncs); else { window.oldonload = window.onload; window.onload = function() { window.oldonload(); myLoadFuncs(); } } /** * Loads functions */ function myLoadFuncs() { addPurge(); /*addForceSummary();*/ /*addEditSection0();*/ /*changeLinks();*/ /*addToolBoxLinks();*/ } /** * Forces edit summary */ /** * Adds a "purge" tab */ function addPurge() { ta['ca-purge'] = ['g', 'Purge the internal cache for this page']; if(!document.getElementById) return; var x = document.getElementById('ca-history'); var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; if(!x) { return; } if(x.children) { x = x.children[0]; } else { x = x.childNodes[0]; } addlilink(tabs, x.href.replace(/=history/, "=purge"), 'purge', 'ca-purge'); } /** * Adds tabs */ function addlilink(tabs, url, name, id) { var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); li.id = id; li.appendChild(na); tabs.appendChild(li); return li; } /* </nowiki></pre> */