User:Jocke Pirat/monobook.js
π°π π πΉπΊπΉππ΄π³πΎπ°, ππ πππΉπΎπ π΄π²πΊπ΄πΉπΊπ»πππ΄π³πΎπ°
< User:Jocke Pirat
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.
//<pre> function extraTabs() { if (!document.getElementById('ca-edit')) return; // Gothic Tab addTab('π²πΏππΉππΊπ°π±ππΊπ°', "got" , 'tab-got'); // Edit section 0 addTab('Rumaboka', "la" . 'tab-la'); }; addOnloadHook(extraTabs); function addTab(text, url, id) { var xp_tabs = document.evaluate("//div[@id='p-cactions']/ul", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null); var tabs = xp_tabs.singleNodeValue; var newTab = document.createElement("li"); newTab.innerHTML = '<a href="javascript:' + DecideFunct(url); + '">' + text + '</a>'; tabs.appendChild(newTab); newTab.id = id; return newTab; } function DecideFunct(code) { if(code == "got") { return "ToGothic()"; } if(code == "la") { return "ToLatin()"; } } function ToGothic() { alert("Success at test"); return 0; } function ToLatin() { alert("Test was success"); return 0; } //</pre>