User:Nwash/monobook.js

function addPurge {   var hist; var url; if (!(hist = document.getElementById('ca-history') )) return; if (!(url = hist.getElementsByTagName('a')[0] )) return; if (!(url = url.href )) return; addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'),                  'purge', 'ca-purge', 'Purge server cache', '0'); } addOnloadHook(addPurge);

function addGWWPageLink {   var url = location.href; var title = url.replace(/^.*[\?&;]title=(.*?)([&;]|$).*$/, '$1'); if (title == url) title = url.replace(/^.*\x2F\x2F.*?\x2F(.*?)(\x3F|$).*$/, '$1'); if (title) addPortletLink('p-cactions', 'http://wiki.guildwars.com/wiki/' + title,                     'GWW page', 'ca-gww', 'Matching page on Guild Wars Wiki', 'g'); } addOnloadHook(addGWWPageLink);