User:Emmett/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 gwwtLoadAfter = function { var myLinks = new PortletArea('p-mylinks', 'My Wiki Links', document.getElementById( 'p-search' )); //This will add them ABOVE the Search Box. myLinks.addItem ( 'shadow_Main', 'Main page', '/wiki/Main_Page', 'Jump to the Mainpage'); myLinks.addItem ( 'shadow_Comm', 'Community Portal', '/wiki/Guild_Wars_Wiki:Community_portal', 'Jump to the Community Portal'); myLinks.addItem ( 'shadow_Update', 'Game Updates', '/wiki/Game_updates', 'View the Recent Game Update Notes'); myLinks.addItem ( 'shadow_CfD', 'Candidates for Deletion', '/wiki/Category:Candidates for deletion', 'Pages to be deleted'); myLinks.addItem ( 'shadow_CfSD', 'Candidates for Speedy Deletion', '/wiki/Category:Candidates for speedy deletion', 'Speedy deletion candidates'); myLinks.addItem ( 'shadow_Log', 'Master log', '/wiki/Special:Log', 'View the wiki log'); myLinks.addItem ( 'shadow_Prefix', 'Prefixindex', '/wiki/Special:Prefixindex', 'Special:Prefixindex'); myLinks.addItem ( 'shadow_AN', 'Admin noticeboard', '/wiki/Guild Wars Wiki:Admin noticeboard', 'Admin noticeboard'); clearRecentChanges;

//myLinks.addItem ('unique_Identifier', 'Display name', 'The URL to display.', 'Mouseover Text'); }

/**** Sysop automaticPatrol * (c) 2008 by Patrick Westerhoff [poke] */ addScript( 'User:Poke/GuildWarsWikiTools/automaticPatrol.js' ); hookEvent( 'load', function { gwwtAutomaticPatrol( false ); } );

/* function clearRecentChanges {  if ( wgPageName !== 'Special:RecentChanges' ) return false; var removeNames = [ ' ' ]; var removeWords = [ 'Guild:', 'Guild talk:']; var i, li, lis, xpath, remove = new Array; xpath = '//div[@id="bodyContent"]//li[ '; xpath += 'contains( a[4]/@title, "' + removeNames.join( '" ) or contains( a[4]/@title, "' ) + '" ) or '; xpath += 'contains( a[1]/@title, "' + removeWords.join( '" ) or contains( a[1]/@title, "' ) + '" ) or '; xpath += 'contains( span[@class="comment"], "' + removeWords.join( '" ) or contains( span[@class="comment"], "' ) + '" ) ]'; lis   = document.evaluate( xpath, document, null, 4, null ); while( ( li = lis.iterateNext ) ) {    remove.push( li ); }  while( ( li = remove.pop ) ) {    li.parentNode.removeChild( li ); } }