User:Shard/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';

// //AVT by MisterPepe // //ImportScript - for all your JS needs

//Start AVT options //AVTSysop should only be set to 'true' if you are a sysop and wish to use the sysop deletion and blocking functions. If you're not a sysop, the links won't work and may break your installation =P //AVTCompatibilityMode should be set to 'true' if you wish to use this script with Poke's GWWT, as it gets rid of duplicate tabs. I'm still not entirely sure it'll work, though - the css files may be incompatible (bugger if I know). //AVTDeltabs should be set to 'true' if you want to use AVT's deletion tagging function. If you'd like to just use those in GWWT or none at all, set this variable to 'false.'

var AVTSysop = false, AVTCompatibilityMode = true, AVTDeltabs = true; //Creates basic configuration. Note that this should be in the installer file

//Start AVT. This script was written by [XoO]MisterPepe and released under the GFDL 1.2+ For patch notes, please see User:MisterPepe/AVT //Requires addPortletLink and addLIMenu (js and css), but these will be installed by default when using the installer function

//End installer update

function importScript(page, lang) { var url = wgScriptPath + '/index.php?title=' + encodeURIComponent(page.replace(' ','_')) + '&action=raw&ctype=text/javascript&dontcountme=s'; if (lang) url = 'http://' + lang + '.wikipedia.org' + url; var s = document.createElement('script'); s.src = url; s.type='text/javascript'; document.getElementsByTagName('head')[0].appendChild(s); }

// Installing teh AVT goodness importScript('User:MisterPepe/AVT/code.js');

//Custom edit buttons of awesomeness addOnloadHook(  function   {   mwEditButtons[7].speedTip="Unsigned";   mwEditButtons[7].sampleText="";   mwEditButtons[7].tagOpen="";  mwEditButtons[7].tagClose="";

mwEditButtons[9].speedTip="Quote"; mwEditButtons[9].imageFile="http://i34.photobucket.com/albums/d134/Shard_Fenix/quoteicon.png"; mwEditButtons[9].tagOpen=""; } );

gwwtLoadAfter = function { clearRecentChanges; }

function clearRecentChanges {  if ( wgPageName !== 'Special:RecentChanges' ) return false; var removeNames = [ '42','Tender Wolf','Titania La Fey']; var removeWords = [ 'Guild:', 'Characters/', 'User talk:Gaile Gray', 'Feedback talk:Gaile Gray','Category:','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 ); } }