User:Cat Slayer Calli/monobook.js

function $(id){return document.getElementById(id);}

addOnloadHook(function{	var my_links=document.createElement('div');my_links.id='p-mylinks';my_links.className='portlet';	my_links.innerHTML=' my links '+		'Public Sandbox'+		'PvX Wiki'+		'&#8203;'+		'My Subpages'+		'<a href="http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions">Parser Functions</a></li>'+		' <a href="/User:Cat_Slayer_Calli/monobook.js">Edit This</a> </li></ul>';	var pnav=$('p-navigation');if(pnav.nextSibling){pnav.parentNode.insertBefore(my_links,pnav.nextSibling);}else{pnav.appendChild(my_links);}my_links=pnav=null; }); addOnloadHook(function{	if(!$('p-cactions') || !$('p-cactions').getElementsByTagName('ul')[0]){return 1;}var pcac=$('p-cactions').getElementsByTagName('ul')[0];	if(window.location.pathname.search(/(Guild:)/i)!==-1){return 2;}var loc=window.location.pathname+window.location.search;	if(loc.search(/\w+\.php/i)===-1){var urlprep='/wiki';}else{var urlprep='';} //Quick test method for whether /wiki/ is needed in the links. May need to fix.	pcac.innerHTML+='<a title="View this page on the Guild Wars Wiki" href="http://wiki.guildwars.com'+urlprep+loc.replace(/GuildWiki/i,"Guild_Wars_Wiki")+'">GWW</a></li><a title="View this page on the Guild Wars 2 Wiki" href="http://wiki.guildwars2.com'+urlprep+loc.replace(/GuildWiki/i,"Guild_Wars_2_Wiki")+'">GW2W</a></li>';	pcac=loc=urlprep=null; });