User:AT/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); }

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

function changeFavicon( url ) { var head  = document.getElementsByTagName( 'head' )[0]; var link = document.createElement( 'link' ); link.rel = 'shortcut icon'; link.type = "image/x-icon"; link.href = url; var links = head.getElementsByTagName( 'link' ); for ( var i = 0; i < links.length; i++ ) {   if ( links[i].rel == 'shortcut icon' ) {      head.removeChild( links[i] ); break; } }  head.appendChild( link ); }

// to run, call changeFavicon onload; for example LoadAfter = function { changeFavicon( 'http://borntolaugh.de/files/GuildWarsWiki.ico' ); if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk") {    var username = encodeURIComponent( wgTitle ); addPortletLink("p-cactions", "http://guildwars.wikia.com/wiki/Special:Contributions/" + username, "Contribs", "ca-contrib", "User contributions"); addPortletLink("p-cactions", "http://guildwars.wikia.com/index.php?title=Special%3APrefixindex&from=" + username + "&namespace=2", "Userspace", "", "List of pages in this user's userspace"); } }

addOnloadHook(LoadAfter);