User:Emperor Jarjarkine/monobook.js

//Stolen from Ecks, who stole it from other people - I think //Adds a new box in the sidebar and populates it with custom links --Grunny addOnloadHook( function {	$('#p-interaction').after(' quick links   ');	addPortletLink('p-navigation','/wiki/TES:A','TES:A');	addPortletLink('p-navigation','/wiki/User:EbonySkyrim','User:EbonySkyrim');

} ); //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/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); //Adds a link in the "interaction" box in Monobook sidebar. By User:Tm_T. addOnloadHook( function {	addPortletLink('p-interaction', "/wiki/Forum:Administrators'_noticeboard", "Admin noticeboard"); }); // Adding links to Monobook's p-personal thing (top right corner). By User:Tm_T function add_link {    var URL1 = '/wiki/User:Cade Calrayn/Codex' addPortletLink('p-personal', URL1, "Codex"); var URL2 = '/wiki/User:Cade Calrayn/Project Hero' addPortletLink('p-personal', URL2, "Project Hero"); } addOnloadHook(add_link); /* Get Purge button. */ importScript("MediaWiki:Gadget-purgebutton.js"); /* Get inactive user display. */ importScript("MediaWiki:Gadget-inactiveusers.js"); /* Get reference tooltips. */ importScript("MediaWiki:Gadget-ReferenceTooltips.js") /* Get duplicate link highlighter. */ importScript("MediaWiki:Gadget-duplinks.js"); importScriptPage('AjaxBatchDelete/code.js', 'dev');