User:Cal Jedi/monobook.js

//Adds a new box in the sidebar and populates it with custom links --Grunny addOnloadHook( function {	$('#p-interaction').after(' quick links   ');	addPortletLink('p-pql','/wiki/Wookieepedia:AgriCorps','AC');	addPortletLink('p-pql','/wiki/Wookieepedia:Inquisitorius','Inq');	addPortletLink('p-pql','/wiki/Wookieepedia:Comprehensive_article_nominations','CAN');	addPortletLink('p-pql','/wiki/Wookieepedia:Good_article_nominations','GAN');	addPortletLink('p-pql','/wiki/Wookieepedia:Featured_article_nominations','FAN');	addPortletLink('p-pql','/wiki/Wookieepedia:Re-featured_article_nominations','RFAN');	addPortletLink('p-pql','/wiki/Wookieepedia:Requests_for_user_rights','RFU');	addPortletLink('p-pql','/wiki/Wookieepedia:Templates','Templates');	addPortletLink('p-pql','/wiki/Wookieepedia:Trash_compactor','TC');	addPortletLink('p-pql','/wiki/Wookieepedia:Wookieepedian_of_the_Month','WOTM');	addPortletLink('p-pql','/wiki/Wookieepedia:Quote_of_the_Day/In-Universe','QOTD'); } );

//Removes some links from the sidebar; by user:Tm T. 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/Wookieepedia:Featured_articles"); 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:Community_Portal"); remove_portlet_link('p-interaction', "http://starwars.wikia.com/wiki/Wookieepedia:IRC"); }

addOnloadHook(remove_links);