User:Entropy/monobook.js

/* links for admins and bcrats */ function addBar { document.getElementById('p-navigation').innerHTML += ' '+ ' '+  ' Command Center '+ ' '+ 'Deletion'+ 'Banning'+ 'Master Log'+ 'New Pages</li>'+ '<a href=\"/wiki/Special:Newimages">New Images</a></li>'+ '<a href=\"/wiki/Special:Blockip">Block User</a></li>'+ '<a href=\"/wiki/Special:Prefixindex">Prefix Index</a></li>'+ '<a href=\"/wiki/Special:Userrights">User Rights</a></li>'+ '</ul> '; }

addOnloadHook(addBar);

/* correct the favicon */ 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 ); }

LoadAfter = function { changeFavicon( 'http://images.wikia.com/gw/images/6/64/Favicon.ico' ); }

addOnloadHook(LoadAfter);

/* add Credits */ function addCredits {   var hist; var url; if (!(hist = document.getElementById('ca-history') )) return; if (!(url = hist.getElementsByTagName('a')[0] )) return; if (!(url = url.href )) return; addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1credits$2'),                  'credits', 'ca-credits', 'Display article credits', '0'); } addOnloadHook(addCredits);

/* Guild Wars Wiki Tools - GuildWiki Switch (c) 2007 by Patrick Westerhoff [User:poke] */

/* GWW tab */ function gwwSwitch {  if ( wgNamespaceNumber < 100 ) {    var itemNode = document.createElement( 'li' ); itemNode.appendChild( document.createElement( 'a' ) ); itemNode.lastChild.href = 'http://wiki.guildwars.com/wiki/Special:RecentChanges'; itemNode.lastChild.title = 'Go to Guild Wars Wiki'; itemNode.lastChild.appendChild( document.createTextNode( 'GWW' ) ); document.getElementById( 'p-cactions' ).getElementsByTagName( 'ul' )[0].appendChild( itemNode ); } } hookEvent( 'load', gwwSwitch );

/* GW2W tab */ function gw2wSwitch {  if ( wgNamespaceNumber < 100 ) {    var itemNode = document.createElement( 'li' ); itemNode.appendChild( document.createElement( 'a' ) ); itemNode.lastChild.href = 'http://wiki.guildwars2.com/wiki/Special:RecentChanges'; itemNode.lastChild.title = 'Go to Guild Wars 2 Wiki'; itemNode.lastChild.appendChild( document.createTextNode( 'GW2W' ) ); document.getElementById( 'p-cactions' ).getElementsByTagName( 'ul' )[0].appendChild( itemNode ); } } hookEvent( 'load', gw2wSwitch );

/* PvX tab */ function pvxSwitch {  if ( wgNamespaceNumber < 100 ) {    var itemNode = document.createElement( 'li' ); itemNode.appendChild( document.createElement( 'a' ) ); itemNode.lastChild.href = 'http://pvx.wikia.com/wiki/Special:RecentChanges'; itemNode.lastChild.title = 'Go to PvX Wiki'; itemNode.lastChild.appendChild( document.createTextNode( 'PvX' ) ); document.getElementById( 'p-cactions' ).getElementsByTagName( 'ul' )[0].appendChild( itemNode ); } } hookEvent( 'load', pvxSwitch );

/* PROJECT TAB */ function projectSwitch {  if ( wgNamespaceNumber < 100 ) {    var itemNode = document.createElement( 'li' ); itemNode.appendChild( document.createElement( 'a' ) ); itemNode.lastChild.href = 'http://guildwars.wikia.com/wiki/Category:Mesmer skills'; itemNode.lastChild.title = 'MESMER SKILLS'; itemNode.lastChild.appendChild( document.createTextNode( 'MESMER SKILLS' ) ); document.getElementById( 'p-cactions' ).getElementsByTagName( 'ul' )[0].appendChild( itemNode ); } } hookEvent( 'load', projectSwitch );

/* youtube tab */ function youtubeSwitch {  if ( wgNamespaceNumber < 100 ) {    var itemNode = document.createElement( 'li' ); itemNode.appendChild( document.createElement( 'a' ) ); itemNode.lastChild.href = 'http://www.youtube.com/'; itemNode.lastChild.title = 'YouTube'; itemNode.lastChild.appendChild( document.createTextNode( 'YouTube' ) ); document.getElementById( 'p-cactions' ).getElementsByTagName( 'ul' )[0].appendChild( itemNode ); } } hookEvent( 'load', youtubeSwitch );