User:Splarka/monobook.js

// http://uncyclopedia.org/index.php?title=User:Splarka/monobook.css&action=raw&ctype=text/css

function wikiabuttons { addwb("navigation","furry","furry.wikia.com") addwb("toolbox","travel","world.wikia.com") }

function addwb(btype, wlabel, wlink) { if((btype == "personal")||(btype == "1")) { var tb = document.getElementById('p-personal').getElementsByTagName('ul')[0]; } else if((btype == "navigation")||(btype == "3")) { var tb = document.getElementById('p-navigation').getElementsByTagName('ul')[0]; } else if((btype == "toolbox")||(btype == "4")) { var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0]; } else if((btype == "language")||(btype == "5")) { var tb = document.getElementById('p-lang').getElementsByTagName('ul')[0]; } else { var tb = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; }

addlilink(tb, 'http://'+ wlink + '/wiki/' + getPname, wlabel, 't-' + wlabel);

}

function addlilink(tabs, url, name, id, title, key){ var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); if(id) li.id = id; li.appendChild(na); tabs.appendChild(li); if(id) {       if(key && title) {           ta[id] = [key, title]; }       else if(key) {           ta[id] = [key, '']; }       else if(title) {           ta[id] = ['', title]; }   }    // re-render the title and accesskeys from existing code in wikibits.js    akeytt; return li; }

function getPname{ z=document.getElementById("content").childNodes; for (var n=0;n<z.length;n++) { if (z[n].className=="firstHeading") return z[n].textContent; }; }

addOnloadHook(wikiabuttons);

//