User:Gimmethegepgun/monobook.js

function removeTopbarHTML (html) { document.getElementById('navbar').innerHTML = html; }

function topBar { removeTopbarHTML(' DeletionBanningMediaWiki messages.css<li id=\>.js</a></li></ul>'); }

addOnloadHook(topBar);

function changeFavicon( url ) { var head  = document.getElementsByTagName( 'head' )[0]; var link = document.createElement( 'link' ); link.rel = 'shortcut icon'; link.type = "image/x-icon"; link.href = url; var links = head.getElementsByTagName( 'link' ); for ( var i = 0; i < links.length; i++ ) {   if ( links[i].rel == 'shortcut icon' ) {      head.removeChild( links[i] ); break; } }  head.appendChild( link ); }

// to run, call changeFavicon onload; for example LoadAfter = function { changeFavicon( 'http://images.wikia.com/gw/images/6/66/GuildWiki_icon.png' ); }

addOnloadHook(LoadAfter)

// Based on createNavigationBarToggleButton in http://www.mediawiki.org/wiki/Manual:NavFrame // by Dr Ishmael, enables toggling skills concise/full

var descShowFull = "[show full descriptions]"; var descShowCon = "[show concise descriptions]";

function createSkillDescToggleButton {	var descHead= document.getElementById("descHead"); // var descFull = document.getElementById('descFull'); // var descCon = document.getElementById('descCon');  // if (descHead && descFull && descCon) { var descToggle = document.createElement("a"); descToggle.style.textAlign= "right"; descToggle.style.fontWeight = "normal"; descToggle.style.fontSize = "smaller"; descToggle.setAttribute('id', 'descToggle'); descToggle.setAttribute('href', 'javascript:toggleSkillDesc;');

var cookiePos = document.cookie.indexOf("showconcise="); var descToggleText; if (cookiePos > -1 && document.cookie.charAt(cookiePos + 12) == 1) { // If showconcise is set, show the concise description... descToggleText = document.createTextNode(descShowFull); descFull.style.display = 'none'; descCon.style.display = 'block'; } else { // ...otherwise show the full description by default descToggleText = document.createTextNode(descShowCon); descFull.style.display = 'block'; descCon.style.display = 'none'; }		descToggle.appendChild(descToggleText); descHead.appendChild(descToggle); } } addOnloadHook( createSkillDescToggleButton );

//Based on toggleToc in http://guildwars.wikia.com/wiki/MediaWiki:Common.js/Toggler

function toggleSkillDesc { var descFull = document.getElementById('descFull'); // var descCon = document.getElementById('descCon');  // var toggleLink = document.getElementById('descToggle'); // 

if (descFull && descCon && toggleLink) { if (descFull.style.display == 'none') { changeText(toggleLink, "show concise descriptions"); descFull.style.display = 'block'; descCon.style.display = 'none'; document.cookie = "showconcise=0"; } else { changeText(toggleLink, "show full descriptions"); descFull.style.display = 'none'; descCon.style.display = 'block'; document.cookie = "showconcise=1"; }	} }