User:GW-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 LoadAfter { 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);

/* var targetType = "self"
 * Google Search
 * This loads search results from google (with the site: parameter).
 * You can modify its behaviour with the targetType variable. There
 * are three options.
 * "self" - the results load in the current window, default behaviour
 * "window" - the results load in a new window
 * "iframe" - the results load in an iframe that replaces content
 * "self" - the results load in the current window, default behaviour
 * "window" - the results load in a new window
 * "iframe" - the results load in an iframe that replaces content

function gs {

var string = ' '+' '+ ' '+ ' google '+ ' '+ ''+ ''+ ''+ ' '+ ' ';

document.getElementById('p-support').innerHTML += string; }

function appendsite { if(targetType=="iframe") { document.getElementById('bodyContent').innerHTML = ""; document.getElementById('content').innerHTML += "Search Results "; } document.gform.gsearch.value += ' site:http://guildwars.wikia.com'; document.gform.submit; }

addOnloadHook(gs);

/* End Google Search */