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>