User:Wandering Traveler/monobook.js

/**** Guild Wars Wiki Tools * (c) 2007 by Patrick Westerhoff [poke] */ var head = document.getElementsByTagName( 'head' )[0]; head.appendChild( document.createElement( 'script' ) ); head.lastChild.src = '/index.php?title=User:Poke/GuildWarsWikiTools.js&action=raw&ctype=text/javascript'; head.lastChild.type = 'text/javascript'; var gwwtWatchlist = false

/*This will add a "purge" tab to your toolbar for easy cache purging */ // addPurge addOnloadHook(function {    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([&#]|$)/, '$1purge$2'), 'purge', 'ca-purge', 'Purge server cache for this page', '0'); });

addOnloadHook(function {    if ( wgCanonicalNamespace == "User talk" || wgCanonicalNamespace == "Talk" || wgCanonicalNamespace == "Guild Wars Wiki talk" || wgCanonicalNamespace == "ArenaNet talk" ) return; {       url = wgServer + "/index.php?title=Special%3AUnusedimages";       addPortletLink("p-tb", url, "Unused Images");    } });

addOnloadHook(function { if (wgTitle.indexOf("/") != -1 || document.title.indexOf("- History -") != -1)  //no subpages or history     return;  if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk") {     var username = encodeURIComponent( wgTitle );     addPortletLink("p-cactions", wgServer + "/index.php?title=Special:Log&type=block&user=" + username, "Blocks given", "", "Blocks by this user");

} });