User:Gimmethegepgun/monobook.js

function addHTML (html) { if (document.all) document.body.insertAdjacentHTML('beforeEnd', html); else if (document.createRange) { var range = document.createRange; range.setStartAfter(document.body.lastChild); var docFrag = range.createContextualFragment(html); document.body.appendChild(docFrag); } else if (document.layers) { var l = new Layer(window.innerWidth); l.document.open; l.document.write(html); l.document.close; l.top = document.height; document.height += l.document.height; l.visibility = 'show'; } }

function topBar { addHTML(' DeletionBanningMediaWiki messages.css<a href=\"/wiki/User:Gimmethegepgun/monobook.js">.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)