User:QuantumEleven/monobook.js

//

// LI Link function

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; }

//

// Add Tab function

function addTab(url, name, id, title, key){ var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; return addlilink(tabs, url, name, id, title, key); } //

// User tabs function

//Please leave the following line //user:Where/usertabs

$(function { if (document.title.search("/") != -1 || document.title.search("- History -") != -1) { //no subpages or history     return;  }  if (document.title.indexOf("User:") == 0 || document.title.indexOf("User talk:") == 0) {     username_a = document.URL.match(/:.*:(.*)/);     username=username_a[1];     addTab("http://en.wikipedia.org/wiki/Special:Contributions/" + username, "contrib", "ca-contrib", "contribs", "");     addTab("http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=move&user=" + username, "page moves", "ca-pagemoves", "page moves", "");     addTab("http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=block&user=" + username, "block log", "ca-blog", "blog", "");     addTab("http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?dbname=enwiki_p&user=" + username, "edit count", "ca-kate", "kate", "");  } });

// User:Henrik/sandbox/google-search (please include this line) function install_search { document.getElementById('searchBody').innerHTML=' '+ ''+ ''+ ''+ ''+ 'Web'+ 'WP'+ ' '; } addOnloadHook(install_search);