Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
importScript( 'User:Grunny/mediatimeline.js' );
//Adds a new box in the sidebar and populates it with custom links --Grunny
addOnloadHook( function () {
$('#p-interaction').after('<div id="p-pql" class="portlet"><h5>quick links</h5><div class="pBody"><ul></ul></div></div>');
addPortletLink('p-pql','/wiki/Wookieepedia:WookieeProject_Video_Games_','WP:VG');
addPortletLink('p-pql','/wiki/Video_game','VideoGames');
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:EduCorps','EC');
addPortletLink('p-pql','/wiki/Wookieepedia:AgriCorps','AC');
addPortletLink('p-pql','/wiki/Wookieepedia:Inquisitorius','Inq');
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');
addPortletLink('p-pql','/wiki/Special:Contributions','Contribs');
addPortletLink('p-pql','/wiki/Special:EditCount','Edits');
addPortletLink('p-pql','/wiki/User:Grunny/Test','Test');
addPortletLink('p-interaction','/wiki/Forum:Administrators'_noticeboard','WP:AN');
} );
//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: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");
}
addOnloadHook(remove_links);
function fixGoButton()
{
$("#searchGoButton").bind("click", function()
{
if ($("#searchInput").val() != "")
{
window.location = "http://starwars.wikia.com/wiki/" + $("#searchInput").val().replace(" ", "_");
return false;
}
});
}
addOnloadHook(fixGoButton);