User:Cade Calrayn/monobook.js

//Sidebar modifications addOnloadHook( function {	addPortletLink('p-navigation','/wiki/Wookieepedia:WookieeProject The Old Republic','WP:TOR');	addPortletLink('p-navigation','/wiki/Wookieepedia:WookieeProject Warfare','WP:Warfare');	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-navigation','/wiki/Category:Browse','Category root');	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');	addPortletLink('p-interaction','/wiki/Wookieepedia:Template_messages/User_talk_namespace','User talk templates'); addPortletLink('p-interaction','/wiki/Special:PrefixIndex','List prefixed pages'); } );

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);