MediaWiki:Wikia.js

/* Import countdown script from http://dev.wikia.com */ importScriptPage('Countdown/code.js', 'dev'); /* Remove the add options on Top 10 Lists */ function removeTop10ListAdd { if(wgCanonicalNamespace == "Top_10_list") { $("#toplists-list-body li:last-child").remove; $(".create-new-list").remove; $(".NewItemForm").remove; } } addOnloadHook(removeTop10ListAdd); /* Add the Right Rail to Community Development Pages */ var GamingPageNames = ["Video_Games/GDC_2012","Top_10_list:10_Most_Anticipated_Games_of_E3_2012","Top_10_list:Best_Game_of_Spring","User_blog:Wagnike2/Best_Video_Games_of_Spring_2012","Video_Games/This_Week's_Tool","Video_Games/MMO_Showdown","Top_10_list:Resident_Evil_6_Wishlist","Top_10_list:Best_Game_of_April","Top_10_list:Best_Rockstar_Game","Video_Games/Comic_Book_Showdown","Top_10_list:Motion_Controlled_Games","Top_10_list:Top_10_Fable_Heroes","Top_10_list:Top_10_Games_of_May","Video_Games/Ghost_Recon_Showdown","Top_10_list:Top_7_E3_Characters","Top_10_list:Best_E3_Trailer","Video_Games/Summer_Games_Guide_2012","Top_10_list:Top_10_Retro_Platformers"]; var EntertainmentPageNames = ["Entertainment/Avengers_Battle_Royale","Top_10_list:Top_10_Futurama_Heads","Entertainment/Action_Hero_Showdown"]; var LifestylePageNames = ["Top_10_list:Non-Gaming_Uses_for_The_Kinect"]; if($.inArray(wgPageName, GamingPageNames) >= 0 || $.inArray(wgPageName, EntertainmentPageNames) >= 0 || $.inArray(wgPageName, LifestylePageNames) >= 0) { function addRightRail { if($.inArray(wgPageName, GamingPageNames) >= 0) { var FacebookID = '5678222299'; var TwitterID = 'Gaming_Twitter_Widget'; var TopWikisItems = 'Top Gaming Wikis Mass Effect WikiThe Elder Scrolls WikiRuneScape WikiFallout Wiki</a></li><a class="text" href="http://www.wowwiki.com/?redirect=no">WoWWiki</a></li><a class="text" href="http://wiki.ffxiclopedia.org/?redirect=no">Final Fantasy XI Wiki</a></li><a class="text" href="http://leagueoflegends.wikia.com/?redirect=no">League of Legends Wiki</a></li><a class="text" href="http://callofduty.wikia.com/?redirect=no">Call of Duty Wiki</a></li><a class="text" href="http://tibia.wikia.com/?redirect=no">Tibia Wiki</a></li><a class="text" href="http://finalfantasy.wikia.com/?redirect=no">Final Fantasy Wiki</a></li></ol>   '; } else if($.inArray(wgPageName, EntertainmentPageNames) >= 0) { var FacebookID = '5678222299'; var TwitterID = 'Entertainment_Twitter_Widget'; var TopWikisItems = '<h1 style="margin-top:0px; margin-bottom:10px;">Top Entertainment Wikis <ol><a class="text" href="http://starwars.wikia.com/wiki/Main_Page">Wookieepedia</a></li><a class="text" href="http://naruto.wikia.com/wiki/Narutopedia">Narutopedia</a></li><a class="text" href="http://dragonball.wikia.com/wiki/Main_Page">Dragon Ball Wiki</a></li><a class="text" href="http://onepiece.wikia.com/wiki/Main_Page">One Piece Encyclopedia</a></li><a class="text" href="http://harrypotter.wikia.com/wiki/Main_Page">Harry Potter Wiki</a></li><a class="text" href="http://en.memory-alpha.org/wiki/Portal:Main">Memory Alpha</a></li><a class="text" href="http://marvel.wikia.com/Main_Page">Marvel Database</a></li><a class="text" href="http://digimon.wikia.com/wiki/Digimon_Wiki">Digimon Wiki</a></li><a class="text" href="http://bleach.wikia.com/wiki/Bleach_Wiki">Bleach Wiki</a></li><a class="text" href="http://glee.wikia.com/wiki/Glee_TV_Show_Wiki">Glee TV Show Wiki</a></li></ol>   '; } else if($.inArray(wgPageName, LifestylePageNames) >= 0) { var FacebookID = '5678222299'; var TwitterID = 'Lifestyle_Twitter_Widget'; var TopWikisItems = '<h1 style="margin-top:0px; margin-bottom:10px;">Top Lifestyle Wikis <ol><li><a class=text href="http://logos.wikia.com/?redirect=no">Logopedia</a></li><li><a class=text href="http://recipes.wikia.com/?redirect=no">Recipes Wiki</a></li><li><a class=text href="http://familypedia.wikia.com/?redirect=no">Familypedia</a></li><li><a class=text href="http://vintagepatterns.wikia.com/?redirect=no">Vintage Patterns Wiki</a></li><li><a class=text href="http://how-to.wikia.com/?redirect=no">How-To Wiki</a></li><li><a class=text href="http://mikumikudance.wikia.com/?redirect=no">MikuMikuDance Wiki</a></li><li><a class=text href="http://tattoos.wikia.com/?redirect=no">Tattoos Wiki</a></li><li><a class=text href="http://dogs-cats.wikia.com/?redirect=no">Dogs and Cats Wiki</a></li><li><a class=text href="http://petdiabetes.wikia.com/?redirect=no">Pet Diabetes Wiki</a></li><li><a class=text href="http://fanloid.wikia.com/?redirect=no">Fanloid Wiki</a></li></ol>   '; } var TopWikisList = '<section class="TopWikis module">' + TopWikisItems + ' '; var FacebookBox = '<iframe marginheight="0" marginwidth="0" src="http://www.facebook.com/connect/connect.php?id=' + FacebookID + '&connections=10" align="top" frameborder="0" width="300" height="250" scrolling="no"> '; var TwitterBox = '<iframe marginheight="0" marginwidth="0" src="http://messaging.wikia.com/index.php?title=' + TwitterID +'&action=render" align="top" frameborder="0" width="300" height="400" scrolling="no"> '; $("#WikiaRail").append(TopWikisList); $("#WikiaRail").append(FacebookBox); $("#WikiaRail").append(TwitterBox); } addOnloadHook(addRightRail); } /* Move poll on the Entertainment/TV_Schedule page */ if(wgPageName == "Entertainment/TV_Schedule") { $("#TVPoll").appendTo("#TVPollPlaceholder"); }