User:Cookie 123/monobook.js

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); }

/**** 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'; insertScript('MediaWiki:TemplateTools.js');

// ***** ADDITIONAL LINKS *****

function addBar { document.getElementById('p-navigation').innerHTML += ' '+ ' '+  ' All Wiki Links '+ ' '+ 'Deletion Candidates'+ 'Banning Candidates'+ 'Logs'+ 'Userpage</li>'+ '<li id=\>Usertalk</a></li>'+ '<li id=\>Edits</a></li>'+ '<li id=\>Elites</a></li>'+ '<li id=\>Monobook.js</a></li>'+ '</ul> '; } //Close addBar addOnloadHook(addBar); //Call addBar on load

//WikiSwap importScript('User:AT/wikiswap.js');

//

var TOOLSCRIPTPATH = 'User:Warwick/';

function DocWriteJS(partialPage){ insertSubscript(partialPage); }

// Loads up ../DebugTools.js var DEBUGMODE = true;

insertScript('MediaWiki:TemplateTools.js'); insertExternalCSS('http://www.wikia.com/index.php?title=User:Warwick/Sandbox/1.css&action=raw&ctype=text/css&smaxage=18000');

/* * Overwrites the original function in http://gw.gamewikis.org/skins/common/sorttable.js  * with User:Warwick/sortable_mod.js. Commented out function sortableTables { if (getElementsByClassName(document, "table", "sortable").length != 0) { insertSubscript('sortable_mod.js'); } }

//

/*********************************************************************************************

Switchbox tools
*/

var overrideNamespaces; var cancelSearchswitch;

function includeJS( page, onWikia, expand ) { document.write('<script type="text/javascript" src="'			+ ( onWikia ? 'http://'+onWikia+'.wikia.com' :  )			+ '/index.php?title=' + page			+ '&action=raw&ctype=text/javascript&dontcountme=s'+( expand == false ?  : '&templates=expand' )+'"> '); }

var mwGroups = new Array(	{ value: '', data: '(all)' },	{ value: 'bot', data: 'Bots' },	{ value: 'sysop', data: 'Sysops' },	{ value: 'bureaucrat', data: 'Bureaucrats' } );

var mwNamespaces = new Array(	{ value: '0', data: '(Main)' },	{ value: '1', data: 'Talk' },	{ value: '2', data: 'User' },	{ value: '3', data: 'User talk' },	{ value: '4', data: 'GuildWiki' },	{ value: '5', data: 'GuildWiki talk' },	{ value: '6', data: 'Image' },	{ value: '7', data: 'Image talk' },	{ value: '8', data: 'MediaWiki' },	{ value: '9', data: 'MediaWiki talk' },	{ value: '10', data: 'Template' },	{ value: '11', data: 'Template talk' },	{ value: '12', data: 'Help' },	{ value: '13', data: 'Help talk' },	{ value: '14', data: 'Category' },	{ value: '15', data: 'Category talk' },	{ value: '100', data: 'Build' },	{ value: '101', data: 'Build talk' } );

if( skin == 'monobook' && !cancelSearchswitch ) includeJS( 'MediaWiki:Searchswitch.js', 'anime' );

/* */

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(' Guild Wars Wiki</a></li>') addHTML('Guild Wars 2 Wiki</a></li>') addHTML('GuildWiki</a></li>') addHTML('</ul>');

}

addOnloadHook(topBar);