MediaWiki:Article.js

// Infobox Module by Eladkse // With thanks to Monchoman45 and Memory Alpha

if(document.getElementById('infobox')) {

function InfoboxModule { $('.WikiaRail form#WikiaSearch').after(' '); $('section#WikiaSpotlightsModule').css({"display": 'none'}); $('#infobox').show; } addOnloadHook(InfoboxModule);

function MoveInfobox { var fooel = document.getElementById('infobox'); if (fooel!=null) { var artel = document.getElementById('InfoboxModule'); var titel = document.getElementById('top'); fooel = fooel.parentNode.removeChild(fooel); if (artel!=null) { artel.parentNode.insertBefore(fooel,artel); } else { titel.parentNode.insertBefore(fooel,titel); } } }

addOnloadHook(MoveInfobox);

function SwitchModules { $('section.InfoboxModule').css({"display": 'block'}); $('section.WikiaPagesOnWikiModule').css({"display": 'none'}); $('section.WikiaActivityModule').css({"display": 'none'}); $('section.LatestPhotosModule').css({"display": 'none'}); $('section.ChatModule').css({"display": 'none'}); $('section.WikiaSpotlightsModule').css({"display": 'none'}); $('section.InfoboxModule').after('&#160;Show Modules&#160;'); $('section.ChatModule').after('&#160;Show Infobox&#160;'); $('ul#switchinfo').hide; } addOnloadHook(SwitchModules); function SwitchRail { $('section.InfoboxModule').css({"display": 'none'}); $('section.WikiaPagesOnWikiModule').css({"display": 'block'}); $('section.WikiaActivityModule').css({"display": 'block'}); $('section.LatestPhotosModule').css({"display": 'block'}); $('section.ChatModule').css({"display": 'block'}); $('section.WikiaSpotlightsModule').css({"display": 'block'}); $('ul#switchrail').hide; $('ul#switchinfo').show; }

function SwitchInfo { $('section.InfoboxModule').css({"display": 'block'}); $('section.WikiaPagesOnWikiModule').css({"display": 'none'}); $('section.WikiaActivityModule').css({"display": 'none'}); $('section.LatestPhotosModule').css({"display": 'none'}); $('section.ChatModule').css({"display": 'none'}); $('section.WikiaSpotlightsModule').css({"display": 'none'}); $('ul#switchinfo').hide; $('ul#switchrail').show; }

}