User:Graestan/monobook.js

//Oasis view tab function addOasis { var URL='http://starwars.wikia.com/index.php?title='+wgCanonicalNamespace+':'+wgTitle+'&useskin=wikia' addPortletLink('p-cactions',URL,"useskin=wikia");} addOnloadHook(addOasis);

//Sidebar modifications addOnloadHook( function {	addPortletLink('p-navigation','/wiki/Wookieepedia:Layout Guide','Layout Guide');	addPortletLink('p-navigation','/wiki/Wookieepedia:Manual of Style','Manual of Style');	addPortletLink('p-navigation','/wiki/Wookieepedia:Policy and consensus updates','Policy updates');	addPortletLink('p-interaction','/wiki/Forum:Administrators%27_noticeboard','Noticeboard');	addPortletLink('p-interaction','/wiki/Wookieepedia:Trash compactor','Trash compactor');	addPortletLink('p-interaction','/wiki/Wookieepedia:Featured_article_nominations','FAN');	addPortletLink('p-interaction','/wiki/Wookieepedia:Good_article_nominations','GAN');	addPortletLink('p-interaction','/wiki/Wookieepedia:Comprehensive_article_nominations','CAN'); } );

function remove_portlet_link(section, link) {   var list = document.getElementById(section) .getElementsByTagName('div')[0] .getElementsByTagName('ul')[0]; var listelements = list.getElementsByTagName('li'); for (var i = 0; i < listelements.length; i++) { if (listelements[i].getElementsByTagName('a')[0].href == link ) { list.removeChild(listelements[i]); }   } } function remove_links {   remove_portlet_link('p-navigation', "http://starwars.wikia.com/wiki/Wookieepedia:Wookieenews"); remove_portlet_link('p-navigation', "http://starwars.wikia.com/wiki/Help:Contents"); remove_portlet_link('p-navigation', "http://starwars.wikia.com/wiki/Wookieepedia:FAQ"); remove_portlet_link('p-interaction', "http://starwars.wikia.com/wiki/Wookieepedia:About"); remove_portlet_link('p-interaction', "http://starwars.wikia.com/wiki/Wookieepedia:IRC"); remove_portlet_link('p-interaction', "http://starwars.wikia.com/wiki/Wookieepedia:Community_Portal"); } addOnloadHook(remove_links);