User:勇者あいうえ/global.js

/* */ /* Deprecated, add new stuff to MediaWiki:Common.js */

/* tooltips and access keys */ ta = new Object; ta['pt-userpage'] = new Array('.','My user page'); ta['pt-anonuserpage'] = new Array('.','The user page for the ip you\'re editing as'); ta['pt-mytalk'] = new Array('n','My talk page'); ta['pt-anontalk'] = new Array('n','Discussion about edits from this ip address'); ta['pt-preferences'] = new Array('','My preferences'); ta['pt-watchlist'] = new Array('l','The list of pages you\'re monitoring for changes.'); ta['pt-mycontris'] = new Array('y','List of my contributions'); ta['pt-login'] = new Array('o','You are encouraged to log in, it is not mandatory however.'); ta['pt-anonlogin'] = new Array('o','You are encouraged to log in, it is not mandatory however.'); ta['pt-logout'] = new Array('o','Log out'); ta['ca-talk'] = new Array('t','Discussion about the content page'); ta['ca-edit'] = new Array('e','You can edit this page. Please use the preview button before saving.'); ta['ca-addsection'] = new Array('+','Add a comment to this discussion.'); ta['ca-viewsource'] = new Array('e','This page is protected. You can view its source.'); ta['ca-history'] = new Array('h','Past versions of this page.'); ta['ca-protect'] = new Array('=','Protect this page'); ta['ca-delete'] = new Array('d','Delete this page'); ta['ca-undelete'] = new Array('d','Restore the edits done to this page before it was deleted'); ta['ca-move'] = new Array('m','Move this page'); ta['ca-watch'] = new Array('w','Add this page to your watchlist'); ta['ca-unwatch'] = new Array('w','Remove this page from your watchlist'); ta['search'] = new Array('f','Search this wiki'); ta['p-logo'] = new Array('','Main Page'); ta['n-mainpage'] = new Array('z','Visit the Main Page'); ta['n-senate'] = new Array('s','Discuss Wookieepedia topics'); ta['n-portal'] = new Array('','About the project, what you can do, where to find things'); ta['n-currentevents'] = new Array('','Find background information on current events'); ta['n-recentchanges'] = new Array('r','The list of recent changes in the wiki'); ta['n-randompage'] = new Array('x','Load a random page'); ta['n-help'] = new Array('','The place to find out'); ta['n-FAQ'] = new Array('','Frequently Asked Questions'); ta['n-chat'] = new Array('','Join the IRC channel'); ta['n-sitesupport'] = new Array('','Support us'); ta['t-whatlinkshere'] = new Array('j','List of all wiki pages that link here'); ta['t-recentchangeslinked'] = new Array('k','Recent changes in pages linked from this page'); ta['feed-rss'] = new Array('','RSS feed for this page'); ta['feed-atom'] = new Array('','Atom feed for this page'); ta['t-contributions'] = new Array('','View the list of contributions of this user'); ta['t-emailuser'] = new Array('','Send a mail to this user'); ta['t-upload'] = new Array('u','Upload images or media files'); ta['t-specialpages'] = new Array('q','List of all special pages'); ta['ca-nstab-main'] = new Array('c','View the content page'); ta['ca-nstab-user'] = new Array('c','View the user page'); ta['ca-nstab-media'] = new Array('c','View the media page'); ta['ca-nstab-special'] = new Array('','This is a special page, you can\'t edit the page itself.'); ta['ca-nstab-wp'] = new Array('a','View the project page'); ta['ca-nstab-image'] = new Array('c','View the image page'); ta['ca-nstab-mediawiki'] = new Array('c','View the system message'); ta['ca-nstab-template'] = new Array('c','View the template'); ta['ca-nstab-help'] = new Array('c','View the help page'); ta['ca-nstab-category'] = new Array('c','View the category page');

// Search icons function replaceSearchIcon { $("#searchBody").find("form").wrapInner(' ') var innerDiv;

var searchbox = document.getElementById( 'searchBody' );

if( searchbox ) { innerDiv = searchbox.getElementsByTagName('div')[0]; var link = innerDiv.getElementsByTagName('a')[0];

if( link ) { innerDiv.removeChild( link ); }   	}

onSearchIconsArrival( innerDiv ); }

function rand( n ) { return Math.round( Math.random * n ); }

// silly legacy name :P // Please note that defining the array here prevents us from having to fetch the article // and so is much faster. Plus, JS files are cached, which makes it even faster. Yay! // --TOR  function onSearchIconsArrival( searchDiv ) { var lines = new Array(		"https://images.wikia.nocookie.net/starwars/images/2/2e/Searchicon1.png DRK-1 Dark Eye probe droid",		"https://images.wikia.nocookie.net/starwars/images/5/5e/Searchicon2.png Viper probe droid",		"https://images.wikia.nocookie.net/starwars/images/1/14/Searchicon7.png TIE/LN starfighter",		"https://images.wikia.nocookie.net/starwars/images/f/f9/Searchicon26.png ASN-121",		"https://images.wikia.nocookie.net/starwars/images/0/09/BrehaSearch.png Breha Organa",		"https://images.wikia.nocookie.net/starwars/images/5/5c/OduminSearch.png Odumin",		"https://images.wikia.nocookie.net/starwars/images/8/82/VaderSearch.png Darth Vader",		"https://images.wikia.nocookie.net/starwars/images/8/8e/HanSearch.png Corellian",		"https://images.wikia.nocookie.net/starwars/images/1/16/Eclipse-search.png Eclipse (starship)",		"https://images.wikia.nocookie.net/starwars/images/f/f9/LAATsearch.png Low Altitude Assault Transport/infantry", "https://images.wikia.nocookie.net/starwars/images/e/e9/Podracer-search.png Podracer", "https://images.wikia.nocookie.net/starwars/images/7/7e/Sandcrawler-search.png Sandcrawler", "https://images.wikia.nocookie.net/starwars/images/b/b1/LadyLuck-search.png Lady Luck", "https://images.wikia.nocookie.net/starwars/images/e/ee/OG9-search.png OG-9 homing spider droid", "https://images.wikia.nocookie.net/starwars/images/d/da/Sentinel-search.png Sentinel-class landing craft", "https://images.wikia.nocookie.net/starwars/images/e/e2/SPHA-search.png Self-Propelled Heavy Artillery", "https://images.wikia.nocookie.net/starwars/images/1/1f/Droideka-search.png Droideka", "https://images.wikia.nocookie.net/starwars/images/b/b9/NihilusSearch.png Darth Nihilus", "https://images.wikia.nocookie.net/starwars/images/c/c8/ClawcraftSearch.png Nssis-class Clawcraft", "https://images.wikia.nocookie.net/starwars/images/b/b0/QuinlanSearch.png Kiffar", "https://images.wikia.nocookie.net/starwars/images/d/d9/AttonSearch.png Atton Rand", "https://images.wikia.nocookie.net/starwars/images/f/f3/SearchSHolocron.png Sith holocron", "https://images.wikia.nocookie.net/starwars/images/b/bd/SearchReek.png Reek", "https://images.wikia.nocookie.net/starwars/images/1/1b/SearchMalak.png Darth Malak", "https://images.wikia.nocookie.net/starwars/images/1/13/SearchLightsaber.png Lightsaber", "https://images.wikia.nocookie.net/starwars/images/a/af/SearchJN66.png JN-66 analysis droid", "https://images.wikia.nocookie.net/starwars/images/4/41/SearchGrievous.png Grievous", "https://images.wikia.nocookie.net/starwars/images/5/55/SearchBasilisk.png Basilisk war droid", "https://images.wikia.nocookie.net/starwars/images/e/e0/SearchT3.png T3-M4", "https://images.wikia.nocookie.net/starwars/images/0/0f/StormieSearch.png Stormtrooper", "https://images.wikia.nocookie.net/starwars/images/c/c0/Jollytrooper-search.png Stormtrooper", "https://images.wikia.nocookie.net/starwars/images/f/fc/Maulhorny-search.png Darth Maul", "https://images.wikia.nocookie.net/starwars/images/3/37/Kueller-search.png Kueller", "https://images.wikia.nocookie.net/starwars/images/1/1c/Searchdani.png Dani", "https://images.wikia.nocookie.net/starwars/images/5/5e/Bothan-search.png Bothan", "https://images.wikia.nocookie.net/starwars/images/f/f4/Electrobinocs-search.png Electrobinoculars", "https://images.wikia.nocookie.net/starwars/images/1/15/Havoc-search.png Havoc (starfighter)", "https://images.wikia.nocookie.net/starwars/images/c/c3/Ewing-search.png E-wing escort starfighter", "https://images.wikia.nocookie.net/starwars/images/f/f1/Bwing-search.png B-wing starfighter", "https://images.wikia.nocookie.net/starwars/images/3/34/Searchgeorge.png George Lucas", "https://images.wikia.nocookie.net/starwars/images/8/81/Cloneph1-search.png Phase I clone trooper armor", "https://images.wikia.nocookie.net/starwars/images/b/bc/Bowcaster-search.png Bowcaster", "https://images.wikia.nocookie.net/starwars/images/6/6c/WESTAR34-search.png WESTAR-34 blaster pistol", "https://images.wikia.nocookie.net/starwars/images/9/95/NSPSSSDsearch.png Nagai expeditionary force", "https://images.wikia.nocookie.net/starwars/images/c/c6/TIEIntSearch.png TIE/In interceptor", "https://images.wikia.nocookie.net/starwars/images/0/02/Search-spacer-aragones.png Spacer", "https://images.wikia.nocookie.net/starwars/images/2/2a/Search-flower.png Veedo Vaocan", "https://images.wikia.nocookie.net/starwars/images/8/83/MillenniumF.PNG Millennium Falcon", "https://images.wikia.nocookie.net/starwars/images/6/64/CloudCarSearch.PNG Storm IV Twin-Pod cloud car", "https://images.wikia.nocookie.net/starwars/images/6/62/Fordo-search.png ARC-77", "https://images.wikia.nocookie.net/starwars/images/1/1f/GonkSearch.PNG GNK power droid", "https://images.wikia.nocookie.net/starwars/images/7/72/SearchHolocron.png Holocron", "https://images.wikia.nocookie.net/starwars/images/c/cb/Bryar-search.png Bryar pistol", "https://images.wikia.nocookie.net/starwars/images/8/84/CadesBloodyBones-search.png Bloody Bones", "https://images.wikia.nocookie.net/starwars/images/2/29/DH17-search.png DH-17 blaster pistol", "https://images.wikia.nocookie.net/starwars/images/d/d5/Liberty-search.png Liberty", "https://images.wikia.nocookie.net/starwars/images/4/4f/FreiTek-search.png FreiTek Incorporated", "https://images.wikia.nocookie.net/starwars/images/9/9f/Incom-search.png Torranix Inertial Compensator Corporation", "https://images.wikia.nocookie.net/starwars/images/1/1d/Jabbatat-search.png Desilijic", "https://images.wikia.nocookie.net/starwars/images/f/ff/N1-search.png Naboo Royal Space Fighter Corps", "https://images.wikia.nocookie.net/starwars/images/c/c2/CloneCmdr-search.png Clone trooper commander", "https://images.wikia.nocookie.net/starwars/images/e/e9/Immobilizer-search.png Immobilizer 418 cruiser", "https://images.wikia.nocookie.net/starwars/images/5/52/ISD-search.png Imperial I-class Star Destroyer", "https://images.wikia.nocookie.net/starwars/images/0/00/Jabitha-search.png Jabitha (starship)", "https://images.wikia.nocookie.net/starwars/images/b/b3/Jetclone-search.png Clone jet trooper", "https://images.wikia.nocookie.net/starwars/images/0/0f/JK13-search.png JK-13 security droid", "https://images.wikia.nocookie.net/starwars/images/e/e6/Speederbike-search.png 74-Z speeder bike", "https://images.wikia.nocookie.net/starwars/images/7/72/Z95-search.png Z-95 Headhunter", "https://images.wikia.nocookie.net/starwars/images/7/70/Jag-search.png Jagged Fel", "https://images.wikia.nocookie.net/starwars/images/a/a3/Jsfkoon-search.png Delta-7 Aethersprite-class light interceptor", "https://images.wikia.nocookie.net/starwars/images/5/52/Icon3XJ.png XJ-6 airspeeder", "https://images.wikia.nocookie.net/starwars/images/8/8f/Icon3Tholme.png Tholme", "https://images.wikia.nocookie.net/starwars/images/c/c0/Icon3Speeder.png Koro-2 Exodrive airspeeder", "https://images.wikia.nocookie.net/starwars/images/c/cf/Icon3Ravager.png Ravager", "https://images.wikia.nocookie.net/starwars/images/a/a7/Icon3Panaka.png Panaka", "https://images.wikia.nocookie.net/starwars/images/9/95/Icon3Laigrek.png Laigrek", "https://images.wikia.nocookie.net/starwars/images/1/17/Icon3Jon.png Jon (farmer)", "https://images.wikia.nocookie.net/starwars/images/6/69/Icon3Jaina.png Jaina Solo", "https://images.wikia.nocookie.net/starwars/images/a/a7/Icon3Corran.png Corran Horn", "https://images.wikia.nocookie.net/starwars/images/3/3b/Icon3Cannok.png Cannok", "https://images.wikia.nocookie.net/starwars/images/9/93/Icon3Atris.png Atris", "https://images.wikia.nocookie.net/starwars/images/d/d9/Mandalorian-search.png Mandalorian", "https://images.wikia.nocookie.net/starwars/images/8/8d/DL44-search.png DL-44 heavy blaster pistol", "https://images.wikia.nocookie.net/starwars/images/a/ac/Clash-search.png Duel on Mustafar", "https://images.wikia.nocookie.net/starwars/images/1/11/Emperor-search.png Palpatine", "https://images.wikia.nocookie.net/starwars/images/d/dd/Hailfire-search.png IG-227 Hailfire-class droid tank", "https://images.wikia.nocookie.net/starwars/images/0/0c/Jetpack-search.png JT-12 jetpack", "https://images.wikia.nocookie.net/starwars/images/e/ec/Omas-search.png Cal Omas", "https://images.wikia.nocookie.net/starwars/images/b/b7/Durge-search.png Durge", "https://images.wikia.nocookie.net/starwars/images/e/e0/Bloodfin-search.png Bloodfin (speeder)", "https://images.wikia.nocookie.net/starwars/images/2/26/Varactyl-search.png Varactyl", "https://images.wikia.nocookie.net/starwars/images/4/4c/Supbattledroid-search.png B2 super battle droid", "https://images.wikia.nocookie.net/starwars/images/8/82/Quingun-search.png Quinlan Vos", "https://images.wikia.nocookie.net/starwars/images/b/b9/Alex_search.png Alexandra Winger", "https://images.wikia.nocookie.net/starwars/images/1/15/Hask_search.png Loka Hask", "https://images.wikia.nocookie.net/starwars/images/0/09/Grunger_search.png Josef Grunger", "https://images.wikia.nocookie.net/starwars/images/9/98/Corvette-search.png CR90 corvette", "https://images.wikia.nocookie.net/starwars/images/9/99/Tarkin-search.png Wilhuff Tarkin", "https://images.wikia.nocookie.net/starwars/images/6/69/Thrackan-search.png Thrackan Sal-Solo", "https://images.wikia.nocookie.net/starwars/images/a/ac/Syal_search.png Syal Antilles Fel", "https://images.wikia.nocookie.net/starwars/images/b/b2/Zsinj_search.png Zsinj", "https://images.wikia.nocookie.net/starwars/images/2/29/Thon_search.png Thon", "https://images.wikia.nocookie.net/starwars/images/0/01/Romeo_search.png Romeo Treblanc", "https://images.wikia.nocookie.net/starwars/images/4/48/Kneesaa_search.png Kneesaa a Jari Kintaka", "https://images.wikia.nocookie.net/starwars/images/5/5a/Melan_search.png Koth Melan", "https://images.wikia.nocookie.net/starwars/images/e/e4/Aleema_search.png Aleema Keto", "https://images.wikia.nocookie.net/starwars/images/0/0a/Satal_search.png Satal Keto", "https://images.wikia.nocookie.net/starwars/images/e/e7/ArcaJeth_search.png Arca Jeth", "https://images.wikia.nocookie.net/starwars/images/9/92/ExarKun_search.png Exar Kun", "https://images.wikia.nocookie.net/starwars/images/4/4d/Han_search.png Han Solo", "https://images.wikia.nocookie.net/starwars/images/6/61/SoontirFel_search.png Soontir Fel", "https://images.wikia.nocookie.net/starwars/images/7/78/Wessel_search.png Redd Wessel", "https://images.wikia.nocookie.net/starwars/images/9/90/Cracken_search.png Airen Cracken", "https://images.wikia.nocookie.net/starwars/images/2/2f/Search_dunhaussen.png Dunhausen", "https://images.wikia.nocookie.net/starwars/images/1/1e/Lowbacca_search.png Lowbacca", "https://images.wikia.nocookie.net/starwars/images/2/2b/Wicket_moon_search.png Wicket Wystri Warrick", "https://images.wikia.nocookie.net/starwars/images/d/df/Laboigg_search.png Laboi", "https://images.wikia.nocookie.net/starwars/images/e/e6/Asha_search.png Asha", "https://images.wikia.nocookie.net/starwars/images/b/b6/Rohlan-search.png Rohlan Dyre", "https://images.wikia.nocookie.net/starwars/images/b/b6/Harkas_icon.png Ran Harkas", "https://images.wikia.nocookie.net/starwars/images/b/bb/Matt_search.png Matt Talon", "https://images.wikia.nocookie.net/starwars/images/2/2e/Rango_search.png Rango Tel", "https://images.wikia.nocookie.net/starwars/images/7/77/Olana_search.png Olana Chion", "https://images.wikia.nocookie.net/starwars/images/4/42/Search_Oicunn.png Barrow Oicunn", "https://images.wikia.nocookie.net/starwars/images/9/90/Janus_search.png Janus Greejatus", "https://images.wikia.nocookie.net/starwars/images/6/60/ODAN_sURRch.png Odan-Urr", "https://images.wikia.nocookie.net/starwars/images/8/8b/Hissa_search.png Bertroff Hissa", "https://images.wikia.nocookie.net/starwars/images/f/f2/Hissa_death_search.png Power chair", "https://images.wikia.nocookie.net/starwars/images/9/9e/Squib_Search_logo.png Squib", "https://images.wikia.nocookie.net/starwars/images/2/29/Umwak_search_logo.png Umwak", "https://images.wikia.nocookie.net/starwars/images/2/26/Greedo_Search_logo.png Greedo", "https://images.wikia.nocookie.net/starwars/images/e/e9/Bubo_search_logo.png Buboicullaar", "https://images.wikia.nocookie.net/starwars/images/b/b9/Boushh_Search_logo.png Boushh", "https://images.wikia.nocookie.net/starwars/images/d/d1/Figrin_Dan_Search_logo.png Figrin D'an", "https://images.wikia.nocookie.net/starwars/images/b/ba/Gamorrean_Search_logo.png Gamorrean", "https://images.wikia.nocookie.net/starwars/images/f/f3/Jawa_Search_logo.png Jawa", "https://images.wikia.nocookie.net/starwars/images/3/35/Max_Rebo_Search_logo.png Nalargon", "https://images.wikia.nocookie.net/starwars/images/d/df/R3_unit_Search_logo.png R3-series astromech droid", "https://images.wikia.nocookie.net/starwars/images/1/1b/Trench-search.png Harch (species)", "https://images.wikia.nocookie.net/starwars/images/c/c6/AAT-search.png Armored Assault Tank", "https://images.wikia.nocookie.net/starwars/images/9/9e/ARC170-search.png Aggressive ReConnaissance-170 starfighter", "https://images.wikia.nocookie.net/starwars/images/8/88/ATAT-search.png All Terrain Armored Transport", "https://images.wikia.nocookie.net/starwars/images/e/e9/E11-search.png E-11 blaster rifle", "https://images.wikia.nocookie.net/starwars/images/5/52/Consular-search.png Consular-class cruiser", "https://images.wikia.nocookie.net/starwars/images/0/0c/Invincible-search.png Invincible (dreadnaught)", "https://images.wikia.nocookie.net/starwars/images/4/48/Jtype-search.png J-type 327 Nubian royal starship", "https://images.wikia.nocookie.net/starwars/images/4/4c/MTT-search.png Multi-Troop Transport", "https://images.wikia.nocookie.net/starwars/images/d/d9/Argyus-search.png Faro Argyus", "https://images.wikia.nocookie.net/starwars/images/0/0d/BoKatan-search.png Bo-Katan", "https://images.wikia.nocookie.net/starwars/images/d/db/CadBane-search.png Cad Bane", "https://images.wikia.nocookie.net/starwars/images/e/e6/BX-search.png BX-series droid commando", "https://images.wikia.nocookie.net/starwars/images/b/b5/Embo-search.png Embo", "https://images.wikia.nocookie.net/starwars/images/7/75/Fives-search.png CT-27-5555", "https://images.wikia.nocookie.net/starwars/images/4/4a/PongKrell-search.png Pong Krell", "https://images.wikia.nocookie.net/starwars/images/0/0c/PreVizsla-search.png Pre Vizsla", "https://images.wikia.nocookie.net/starwars/images/0/07/Rex-search.png CT-7567", "https://images.wikia.nocookie.net/starwars/images/8/86/RiffTamson-search.png Riff Tamson", "https://images.wikia.nocookie.net/starwars/images/9/93/Savage-search.png Savage Opress", "https://images.wikia.nocookie.net/starwars/images/1/1e/Son-search.png Son", "https://images.wikia.nocookie.net/starwars/images/c/c2/Tarfful-search.png Tarfful", "https://images.wikia.nocookie.net/starwars/images/9/93/Tarpals-search.png Roos Tarpals", "https://images.wikia.nocookie.net/starwars/images/b/ba/Ventress-search.png Asajj Ventress", "https://images.wikia.nocookie.net/starwars/images/a/a8/Yaddle-search.png Yaddle", "https://images.wikia.nocookie.net/starwars/images/6/66/Clones-search.png Clone trooper", "https://images.wikia.nocookie.net/starwars/images/a/a6/DeathWatch-search.png Death Watch", "https://images.wikia.nocookie.net/starwars/images/0/05/Twileks-search.png Twi'lek", "https://images.wikia.nocookie.net/starwars/images/4/46/JohnWilliams-search.png John Williams", "https://images.wikia.nocookie.net/starwars/images/2/2c/Yoda-search.png Yoda", "https://images.wikia.nocookie.net/starwars/images/f/f3/DS1-search.png DS-1 Orbital Battle Station", "https://images.wikia.nocookie.net/starwars/images/1/14/DS2-search.png Death Star II", "https://images.wikia.nocookie.net/starwars/images/3/34/AdiGallia-search.png Adi Gallia", "https://images.wikia.nocookie.net/starwars/images/3/3c/CaptObvious-search.png Ric Olié", "https://images.wikia.nocookie.net/starwars/images/b/b2/Dooku-search.png Dooku", "https://images.wikia.nocookie.net/starwars/images/d/d8/Fodesinbeed-search.png Fodesinbeed Annodue", "https://images.wikia.nocookie.net/starwars/images/9/9d/Garnac-search.png Garnac", "https://images.wikia.nocookie.net/starwars/images/d/d8/Jango-search.png Jango Fett", "https://images.wikia.nocookie.net/starwars/images/0/03/JarJar-search.png Jar Jar Binks", "https://images.wikia.nocookie.net/starwars/images/f/ff/KitFisto-search.png Kit Fisto", "https://images.wikia.nocookie.net/starwars/images/7/74/Lando-search.png Lando Calrissian", "https://images.wikia.nocookie.net/starwars/images/f/f4/Luminara-search.png Luminara Unduli", "https://images.wikia.nocookie.net/starwars/images/3/38/NienNunb-search.png Nien Nunb", "https://images.wikia.nocookie.net/starwars/images/f/ff/PloKoon-search.png Plo Koon", "https://images.wikia.nocookie.net/starwars/images/8/81/QGJ-search.png Qui-Gon Jinn", "https://images.wikia.nocookie.net/starwars/images/8/81/Sabe-search.png Sabé", "https://images.wikia.nocookie.net/starwars/images/3/30/Snootles-search.png Sy Snootles", "https://images.wikia.nocookie.net/starwars/images/6/65/NuvoVindi-search.png Nuvo Vindi", "https://images.wikia.nocookie.net/starwars/images/8/82/Ziro-search.png Ziro Desilijic Tiure", "https://images.wikia.nocookie.net/starwars/images/b/b2/BookOfSith-search.png Book of Sith: Secrets from the Dark Side (real-life book)", "https://images.wikia.nocookie.net/starwars/images/0/0e/Sedriss-search.png Sedriss QL", "https://images.wikia.nocookie.net/starwars/images/0/09/XanatosJATM-search.png Xanatos", "https://images.wikia.nocookie.net/starwars/images/f/f2/Booster-search.png Booster Terrik", "https://images.wikia.nocookie.net/starwars/images/6/6c/YlenicItkla-search.png Ylenic It'kla", "https://images.wikia.nocookie.net/starwars/images/2/2b/DarthMalgus-search.png Darth Malgus", "https://images.wikia.nocookie.net/starwars/images/1/1f/SithImpSoldier-search.png Imperial soldier", "https://images.wikia.nocookie.net/starwars/images/8/86/CHA-search.png Coruscant Health Administration", "https://images.wikia.nocookie.net/starwars/images/9/97/HaloTooka-search.png Tooka doll", "https://images.wikia.nocookie.net/starwars/images/2/26/KiffuGuardians-search.png Kiffu Guardians", "https://images.wikia.nocookie.net/starwars/images/a/aa/LokaHask-search.png Corellian limpet", "https://images.wikia.nocookie.net/starwars/images/6/60/PlosBros-search.png Plo's Bros", "https://images.wikia.nocookie.net/starwars/images/0/01/RepublicTOR-search.png Galactic Republic", "https://images.wikia.nocookie.net/starwars/images/d/dd/SithEmpireTOR-search.png Sith Empire (Post–Great Hyperspace War)", "https://images.wikia.nocookie.net/starwars/images/e/ed/RogueSquadron-search.png Rogue Squadron", "https://images.wikia.nocookie.net/starwars/images/0/06/SepNightmare-search.png Separatist Nightmare", "https://images.wikia.nocookie.net/starwars/images/3/34/Stohkli-search.png Stokhli spray stick", "https://images.wikia.nocookie.net/starwars/images/c/ca/TrenchSymbol-search.png Trench (Admiral)", "https://images.wikia.nocookie.net/starwars/images/6/6c/VongBugs-search.png Razor bug", "https://images.wikia.nocookie.net/starwars/images/6/6d/Vongerella-search.png Vongerella", "https://images.wikia.nocookie.net/starwars/images/4/41/Wolfpack-search.png Wolfpack", "https://images.wikia.nocookie.net/starwars/images/c/c9/WraithSquadron-search.png Wraith Squadron", "https://images.wikia.nocookie.net/starwars/images/7/73/Scimitar-search.png Scimitar", "https://images.wikia.nocookie.net/starwars/images/6/63/BossNass-search.png Rugor Nass", "https://images.wikia.nocookie.net/starwars/images/d/da/Neimoidians-search.png Neimoidian", "https://images.wikia.nocookie.net/starwars/images/4/48/SioBibble-search.png Sio Bibble", "https://images.wikia.nocookie.net/starwars/images/e/e2/BelGuapo-search.png Garm Bel Iblis", "https://images.wikia.nocookie.net/starwars/images/c/c8/Garaint-search.png Noval Garaint", "https://images.wikia.nocookie.net/starwars/images/8/8a/TORBountyHunter-search.png Bounty hunter", "https://images.wikia.nocookie.net/starwars/images/b/b3/TORDarthJadus-search.png Darth Jadus", "https://images.wikia.nocookie.net/starwars/images/1/1c/TORJediKnight-search.png Jedi Knight", "https://images.wikia.nocookie.net/starwars/images/3/3b/TORJewlaNightbringer-search.png Jewl'a Nightbringer", "https://images.wikia.nocookie.net/starwars/images/f/f4/TORKeeper-search.png Keeper (Sith Empire)", "https://images.wikia.nocookie.net/starwars/images/c/c9/TORMandaloreTheVindicated-search.png Mandalore the Vindicated", "https://images.wikia.nocookie.net/starwars/images/9/96/TORSateleShan-search.png Satele Shan", "https://images.wikia.nocookie.net/starwars/images/7/71/TORSithImperialAgent-search.png Imperial Intelligence (Sith Empire)", "https://images.wikia.nocookie.net/starwars/images/a/ad/TORSithInquisitor-search.png Sith Inquisitor", "https://images.wikia.nocookie.net/starwars/images/d/d1/TORSithWarrior-search.png Sith Warrior", "https://images.wikia.nocookie.net/starwars/images/1/1e/TORVette-search.png Vette", "https://images.wikia.nocookie.net/starwars/images/c/cc/TORnexu-search.png Nexu", "https://images.wikia.nocookie.net/starwars/images/8/82/TORHoloNetTerminal-search.png HoloNet", "https://images.wikia.nocookie.net/starwars/images/c/c2/AurraSing-search.png Aurra Sing", "https://images.wikia.nocookie.net/starwars/images/7/79/DexterJettster-search.png Dexter Jettster", "https://images.wikia.nocookie.net/starwars/images/5/52/ShadowStormtrooper-search.png Shadow stormtrooper", "https://images.wikia.nocookie.net/starwars/images/f/f4/TauntaunSearch.png Tauntaun", "https://images.wikia.nocookie.net/starwars/images/b/b9/WookieeTrio-search.png Wookiee", "https://images.wikia.nocookie.net/starwars/images/0/0c/SlyMooreIsWatchingWookieepediaPoop.png Sly Moore", "https://images.wikia.nocookie.net/starwars/images/b/bf/Muk-muk_Search_logo.png Pilf Mukmuk", "https://images.wikia.nocookie.net/starwars/images/0/08/AbomidableWookiee-search.png Chewbacca", "https://images.wikia.nocookie.net/starwars/images/d/d1/Acclamator-search.png Acclamator-class assault ship", "https://images.wikia.nocookie.net/starwars/images/1/14/B2HAsbd-search.png B2-HA series super battle droid", "https://images.wikia.nocookie.net/starwars/images/d/d1/Draethos-search.png Draethos", "https://images.wikia.nocookie.net/starwars/images/9/91/IG86Sentinel-search.png IG-86 sentinel droid", "https://images.wikia.nocookie.net/starwars/images/9/9f/KwazelMaw-search.png Kwazel Maw", "https://images.wikia.nocookie.net/starwars/images/d/d4/MagnaGuard-search.png IG-100 MagnaGuard", "https://images.wikia.nocookie.net/starwars/images/4/44/Seripas-search.png Seripas", "https://images.wikia.nocookie.net/starwars/images/9/99/TacticalDroid-search.png T-series tactical droid", "https://images.wikia.nocookie.net/starwars/images/a/a2/Zlato-search.png Zlato", "https://images.wikia.nocookie.net/starwars/images/5/57/ELG3A-search.png ELG-3A blaster pistol", "https://images.wikia.nocookie.net/starwars/images/2/24/AA1VerboBrain-search.png AA-1 VerboBrain", "https://images.wikia.nocookie.net/starwars/images/0/03/C3PX-search.png C-3PX", "https://images.wikia.nocookie.net/starwars/images/6/67/Cronal-search.png Cronal", "https://images.wikia.nocookie.net/starwars/images/6/6b/Kallidahin-search.png Kallidahin", "https://images.wikia.nocookie.net/starwars/images/3/33/Sluissi-search.png Sluissi", "https://images.wikia.nocookie.net/starwars/images/4/44/Togorian-search.png Togorian", "https://images.wikia.nocookie.net/starwars/images/5/53/Ysalamir-search.png Ysalamir", "https://images.wikia.nocookie.net/starwars/images/b/b3/BocAseca-search.png Boc Aseca", "https://images.wikia.nocookie.net/starwars/images/a/a0/Quarren-search.png Quarren", "https://images.wikia.nocookie.net/starwars/images/f/f7/BobaFett-search.png Boba Fett", "https://images.wikia.nocookie.net/starwars/images/4/40/Brakiss-search.png Brakiss", "https://images.wikia.nocookie.net/starwars/images/0/05/Callista-search.png Callista Ming", "https://images.wikia.nocookie.net/starwars/images/7/77/Droma-search.png Droma", "https://images.wikia.nocookie.net/starwars/images/6/63/Durga-search.png Durga Besadii Tai", "https://images.wikia.nocookie.net/starwars/images/5/52/LordHoth-search.png Hoth (Jedi Lord)", "https://images.wikia.nocookie.net/starwars/images/1/15/NomAnor-search.png Nom Anor", "https://images.wikia.nocookie.net/starwars/images/4/45/YsanneIsard-search.png Ysanne Isard", "https://images.wikia.nocookie.net/starwars/images/0/0d/ScottHepburnVsTheArtWorld-Search.png Celeste Morne", "https://images.wikia.nocookie.net/starwars/images/d/d7/Ackbar-search.png Gial Ackbar", "https://images.wikia.nocookie.net/starwars/images/8/85/Bossk-search.png Bossk", "https://images.wikia.nocookie.net/starwars/images/0/09/Brezak-search.png Brezak", "https://images.wikia.nocookie.net/starwars/images/b/b6/LSW3-search.png LEGO Star Wars III: The Clone Wars", "https://images.wikia.nocookie.net/starwars/images/2/27/OpeeSeaKiller-search.png Opee sea killer", "https://images.wikia.nocookie.net/starwars/images/e/e3/ATTE-search.png All Terrain Tactical Enforcer", "https://images.wikia.nocookie.net/starwars/images/c/c3/B1-search.png B1 battle droid", "https://images.wikia.nocookie.net/starwars/images/6/67/BladeOfDorin-search.png Blade of Dorin", "https://images.wikia.nocookie.net/starwars/images/4/4f/Delta7B-search.png Delta-7B Aethersprite-class light interceptor", "https://images.wikia.nocookie.net/starwars/images/d/d6/FlashSpeeder-search.png Seraph-class urban landspeeder", "https://images.wikia.nocookie.net/starwars/images/2/26/LambdaShuttle-search.png Lambda-class T-4a shuttle", "https://images.wikia.nocookie.net/starwars/images/b/b9/Malevolence-search.png Malevolence", "https://images.wikia.nocookie.net/starwars/images/c/c1/N1Starfighter-search.png N-1 starfighter", "https://images.wikia.nocookie.net/starwars/images/d/da/SlaveI-search.png Slave I", "https://images.wikia.nocookie.net/starwars/images/9/90/StealthShip-search.png Stealth ship", "https://images.wikia.nocookie.net/starwars/images/3/3c/Trident-search.png Trident-class assault ship", "https://images.wikia.nocookie.net/starwars/images/5/5a/Venator-search.png Venator-class Star Destroyer", "https://images.wikia.nocookie.net/starwars/images/5/56/VocalEmulator-search.png Vocal emulator", "https://images.wikia.nocookie.net/starwars/images/1/1a/Watto-search.png Watto", "https://images.wikia.nocookie.net/starwars/images/a/a3/Xwing-search.png T-65 X-wing starfighter", "https://images.wikia.nocookie.net/starwars/images/9/98/Ywing-search.png BTL Y-wing starfighter", "https://images.wikia.nocookie.net/starwars/images/6/63/Merciless-Search.png Merciless (Aggressor-class destroyer)", "https://images.wikia.nocookie.net/starwars/images/c/c4/Kuat-Search.png Kuat", "https://images.wikia.nocookie.net/starwars/images/f/fc/BARC-search.png BARC speeder", "https://images.wikia.nocookie.net/starwars/images/b/b4/CmdrCody-search.png CC-2224", "https://images.wikia.nocookie.net/starwars/images/8/89/DarthBane-search.png Darth Bane", "https://images.wikia.nocookie.net/starwars/images/0/06/DuchessSatine-search.png Satine Kryze", "https://images.wikia.nocookie.net/starwars/images/e/e3/EasyRide-search.png EasyRide passenger airspeeder", "https://images.wikia.nocookie.net/starwars/images/f/fe/EethKoth-search.png Eeth Koth", "https://images.wikia.nocookie.net/starwars/images/8/84/EvenPiell-search.png Even Piell", "https://images.wikia.nocookie.net/starwars/images/6/6d/HondoOhnaka-search.png Hondo Ohnaka", "https://images.wikia.nocookie.net/starwars/images/3/3c/Katuunko-search.png Katuunko", "https://images.wikia.nocookie.net/starwars/images/b/b9/KiAdiMundi-search.png Ki-Adi-Mundi", "https://images.wikia.nocookie.net/starwars/images/b/be/Kitster-search.png Kitster Chanchani Banai", "https://images.wikia.nocookie.net/starwars/images/f/f4/MonCalamari-search.png Mon Calamari", "https://images.wikia.nocookie.net/starwars/images/9/97/Neeyutnee-search.png Neeyutnee", "https://images.wikia.nocookie.net/starwars/images/1/13/Numa-search.png Numa", "https://images.wikia.nocookie.net/starwars/images/b/bd/SaeseeTiin-search.png Saesee Tiin", "https://images.wikia.nocookie.net/starwars/images/c/c8/Sebulba-search.png Sebulba", "https://images.wikia.nocookie.net/starwars/images/b/bf/Sugi-search.png Sugi", "https://images.wikia.nocookie.net/starwars/images/8/85/Talzin-search.png Talzin", "https://images.wikia.nocookie.net/starwars/images/b/bf/Talz-search.png Talz", "https://images.wikia.nocookie.net/starwars/images/7/71/TuskenRaiders-search.png Tusken Raider", "https://images.wikia.nocookie.net/starwars/images/e/e3/Valorum-search.png Finis Valorum", "https://images.wikia.nocookie.net/starwars/images/d/dc/Wald-search.png W. Wald", "https://images.wikia.nocookie.net/starwars/images/0/0b/WatTambor-search.png Wat Tambor", "https://images.wikia.nocookie.net/starwars/images/9/96/Zygerrians-search.png Zygerrian", "https://images.wikia.nocookie.net/starwars/images/d/d5/Jabba-search.png Jabba Desilijic Tiure", "https://images.wikia.nocookie.net/starwars/images/f/f4/A5Juggernaut-search.png Heavy Assault Vehicle/wheeled A5 Juggernaut", "https://images.wikia.nocookie.net/starwars/images/4/47/Acklay-search.png Acklay", "https://images.wikia.nocookie.net/starwars/images/8/82/Boots-search.png Boot", "https://images.wikia.nocookie.net/starwars/images/0/03/CK6swoop-search.png CK-6 swoop", "https://images.wikia.nocookie.net/starwars/images/f/f8/Eta2-search.png Eta-2 Actis-class light interceptor", "https://images.wikia.nocookie.net/starwars/images/a/ac/Holoprojector-search.png Holoprojector", "https://images.wikia.nocookie.net/starwars/images/7/7b/MandoRoyalGuard-search.png Mandalorian Royal Guard", "https://images.wikia.nocookie.net/starwars/images/5/5d/Pie-search.png Pie", "https://images.wikia.nocookie.net/starwars/images/f/f0/ProtocolDroid-search.png Protocol droid", "https://images.wikia.nocookie.net/starwars/images/d/d8/Rystall-search.png Rystáll Sant", "https://images.wikia.nocookie.net/starwars/images/9/90/WampaClaws-search.png Claw", "https://images.wikia.nocookie.net/starwars/images/a/a0/X34Landspeeder-search.png X-34 landspeeder", "https://images.wikia.nocookie.net/starwars/images/c/c8/YodaAtaru-search.png Form IV: Ataru", "https://images.wikia.nocookie.net/starwars/images/2/25/Yuuzhantar-search.png Yuuzhan'tar (Original)", "https://images.wikia.nocookie.net/starwars/images/6/62/Nelvaanian-search.png Nelvaanian", "https://images.wikia.nocookie.net/starwars/images/4/4d/Fosh-search.png Fosh", "https://images.wikia.nocookie.net/starwars/images/6/67/Noghri-search.png Noghri", "https://images.wikia.nocookie.net/starwars/images/f/ff/Trill-search.png Trill (Force Hound)", "https://images.wikia.nocookie.net/starwars/images/e/e7/AhsokaShien-search.png Form V: Shien / Djem So", "https://images.wikia.nocookie.net/starwars/images/9/9d/Ewoks-search.png Ewok", "https://images.wikia.nocookie.net/starwars/images/8/80/ImpedingAssaultTank-search.png Impeding Assault Tank", "https://images.wikia.nocookie.net/starwars/images/e/e2/KarinaTheGreat-search.png Karina the Great", "https://images.wikia.nocookie.net/starwars/images/6/68/SandSloth-search.png Sand Sloth", "https://images.wikia.nocookie.net/starwars/images/e/eb/ShockWhip-search.png Shock whip", "https://images.wikia.nocookie.net/starwars/images/e/e6/SilverSpeeder-search.png Silver Speeder", "https://images.wikia.nocookie.net/starwars/images/6/68/WhiteWitch-search.png White Witch", "https://images.wikia.nocookie.net/starwars/images/d/df/YodaForceStance-search.png Force form", "https://images.wikia.nocookie.net/starwars/images/2/26/Vima-search.png Vima Sunrider", "https://images.wikia.nocookie.net/starwars/images/a/a2/Tahl-search.png Tahl", "https://images.wikia.nocookie.net/starwars/images/a/a6/C9979-search.png C-9979 landing craft", "https://images.wikia.nocookie.net/starwars/images/7/7a/DaultayDofine-search.png Daultay Dofine", "https://images.wikia.nocookie.net/starwars/images/b/b1/DDT-search.png Defoliator Deployment Tank", "https://images.wikia.nocookie.net/starwars/images/2/2b/HyenaBomber-search.png Hyena-class bomber", "https://images.wikia.nocookie.net/starwars/images/c/ce/RuneHaako-search.png Rune Haako", "https://images.wikia.nocookie.net/starwars/images/2/28/VultureDroid-search.png Variable Geometry Self-Propelled Battle Droid, Mark I", "https://images.wikia.nocookie.net/starwars/images/0/07/Zombie-search.png Zombie", "https://images.wikia.nocookie.net/starwars/images/6/6a/CmdrFox-search.png CC-1010", "https://images.wikia.nocookie.net/starwars/images/8/86/DroidTriFighter-search.png Droid tri-fighter", "https://images.wikia.nocookie.net/starwars/images/a/a3/FlitknotSpeeder-search.png Flitknot speeder", "https://images.wikia.nocookie.net/starwars/images/9/9b/GalenMarek-search.png Galen Marek", "https://images.wikia.nocookie.net/starwars/images/6/6a/HK47-search.png HK-47", "https://images.wikia.nocookie.net/starwars/images/3/39/MarisBrood-search.png Maris Brood", "https://images.wikia.nocookie.net/starwars/images/1/13/Munificent-search.png Munificent-class star frigate", "https://images.wikia.nocookie.net/starwars/images/4/49/PROXY-search.png PROXY", "https://images.wikia.nocookie.net/starwars/images/a/a6/RahmKota-search.png Rahm Kota", "https://images.wikia.nocookie.net/starwars/images/0/0d/T47-search.png T-47 airspeeder", "https://images.wikia.nocookie.net/starwars/images/3/34/Blistmok-search.png Blistmok", "https://images.wikia.nocookie.net/starwars/images/6/64/Nomi-search.png Nomi Sunrider", "https://images.wikia.nocookie.net/starwars/images/8/80/O%27cerry-search.png O'cerry", "https://images.wikia.nocookie.net/starwars/images/b/bb/Norky-search.png Norky", "https://images.wikia.nocookie.net/starwars/images/e/e6/AntaresDraco-search.png Antares Draco", "https://images.wikia.nocookie.net/starwars/images/7/76/BarrissOffee-search.png Barriss Offee", "https://images.wikia.nocookie.net/starwars/images/b/b2/JariahSyn-search.png Jariah Syn", "https://images.wikia.nocookie.net/starwars/images/6/67/L8L9-search.png L8-L9", "https://images.wikia.nocookie.net/starwars/images/1/12/RoanFel-search.png Roan Fel", "https://images.wikia.nocookie.net/starwars/images/b/ba/RoronCorobb-search.png Roron Corobb", "https://images.wikia.nocookie.net/starwars/images/9/9f/WolfSazenNew-search.png Wolf Sazen", "https://images.wikia.nocookie.net/starwars/images/9/9f/FirefighterDroid-search.png Firefighter droid", "https://images.wikia.nocookie.net/starwars/images/e/e6/LuckyLekku-search.png Lucky Lekku", "https://images.wikia.nocookie.net/starwars/images/1/1e/R2KT-search.png R2-KT", "https://images.wikia.nocookie.net/starwars/images/0/0b/HavenClassMedicalStation-search.png Haven-class medical station", "https://images.wikia.nocookie.net/starwars/images/b/b8/Punworcca-search.png Punworcca 116-class interstellar sloop", "https://images.wikia.nocookie.net/starwars/images/7/73/Roggwart-search.png Roggwart", "https://images.wikia.nocookie.net/starwars/images/5/57/V19Torrent-search.png V-19 Torrent starfighter", "https://images.wikia.nocookie.net/starwars/images/6/64/HoundsTooth-search.png Hound's Tooth", "https://images.wikia.nocookie.net/starwars/images/5/5e/Jarael-search.png Jarael", "https://images.wikia.nocookie.net/starwars/images/9/92/Gryph-search.png Marn Hierogryph", "https://images.wikia.nocookie.net/starwars/images/7/7c/Zayne-search.png Zayne Carrick", "https://images.wikia.nocookie.net/starwars/images/d/d7/JagJaina-search.png Human", "https://images.wikia.nocookie.net/starwars/images/c/c1/TIEPredator-search.png Predator-class fighter", "https://images.wikia.nocookie.net/starwars/images/5/57/Dominator-search.png Interdictor-class Star Destroyer", "https://images.wikia.nocookie.net/starwars/images/2/27/AllahuWokbar-Search.png Ewok Handler", "https://images.wikia.nocookie.net/starwars/images/e/e6/SithDreadnought-Search.png Harrower-class Dreadnaught", "https://images.wikia.nocookie.net/starwars/images/b/bf/Helmsman-search.png Helmsman (battlecruiser)", "https://images.wikia.nocookie.net/starwars/images/d/dd/Searchicon22.png Voren Na'al", "https://images.wikia.nocookie.net/starwars/images/3/30/NebulaClass-search.png Nebula-class Star Destroyer", "https://images.wikia.nocookie.net/starwars/images/c/c9/Togruta-search.png Togruta", "https://images.wikia.nocookie.net/starwars/images/c/c6/Tenelka-search.png Tenel Ka Djo", "https://images.wikia.nocookie.net/starwars/images/c/c1/EE3-search.png EE-3 carbine rifle", "https://images.wikia.nocookie.net/starwars/images/d/d5/21B-search.png 2-1B surgical droid", "https://images.wikia.nocookie.net/starwars/images/7/76/CZ3-search.png CZ-3", "https://images.wikia.nocookie.net/starwars/images/a/a0/Minimech-search.png Minimech CE", "https://images.wikia.nocookie.net/starwars/images/e/e8/MSE-search.png MSE-6-series repair droid", "https://images.wikia.nocookie.net/starwars/images/2/21/Vuffi-search.png Vuffi Raa", "https://images.wikia.nocookie.net/starwars/images/0/03/Xim-bot-search.png Guardian Corps", "https://images.wikia.nocookie.net/starwars/images/1/12/Adasca-search.png Arkoh Adasca", "https://images.wikia.nocookie.net/starwars/images/2/24/Bendix_Fust-search.png Bendix Fust", "https://images.wikia.nocookie.net/starwars/images/8/8c/Deliah-search.png Deliah Blue", "https://images.wikia.nocookie.net/starwars/images/a/a8/Papanoida-search.png N. Papanoida", "https://images.wikia.nocookie.net/starwars/images/f/f2/Plooz-search.png Plooz", "https://images.wikia.nocookie.net/starwars/images/a/ac/Riyo_Chuchi-search.png Riyo Chuchi" );

var line = lines[rand( lines.length - 1 )]; var pos = line.indexOf(' ');

var link = document.createElement( 'div' ); link.id = 'search-icon-wrapper'; var img = document.createElement( 'img' ); img.alt = 'Search'; img.src = ( pos == -1 ) ? line : line.substring( 0, pos ); link.appendChild( img );

searchDiv.insertBefore( link, searchDiv.firstChild );

var div = document.createElement( 'div' ); div.id = 'search-popup'; div.style.display = 'none'; var ul = document.createElement( 'ul' );

var li; var a;

li = document.createElement( 'li' ); a = document.createElement( 'a' ); a.href = wgScriptPath + '/index.php?title=Special:Search&adv=1'; a.appendChild( document.createTextNode( 'Advanced search' ) ); li.appendChild( a ); ul.appendChild( li );

li = document.createElement( 'li' ); a = document.createElement( 'a' ); a.href = ( pos == -1 ) ? 'javascript:emptySearchDesc' : '/wiki/' + line.substring( pos + 1 ); a.appendChild( document.createTextNode( "What's this? (" + ( ( pos == -1 ) ? 'NO DESCRIPTION' : line.substring( pos + 1 ) ) + ')' ) ); li.appendChild( a ); ul.appendChild( li );

li = document.createElement( 'li' ); a = document.createElement( 'a' ); a.href = 'javascript:closeSearchPopup'; a.appendChild( document.createTextNode( 'Close' ) ); li.appendChild( a ); ul.appendChild( li );

var container = document.getElementById( 'globalWrapper' ); if( !container ) { container = document.getElementById( 'container' ); }

div.appendChild( ul ); container.appendChild( div );

link.onclick = openSearchPopup; }

function openSearchPopup( event ) { var div = document.getElementById( 'search-popup' ); var e = event || window.event;

div.style.display = ( div.style.display == 'none' ) ? 'block' : 'none'; div.style.left = e.clientX + 'px'; div.style.top = ( e.clientY + document.documentElement.scrollTop ) + 'px'; }

function closeSearchPopup { document.getElementById( 'search-popup' ).style.display = 'none'; }

function emptySearchDesc { alert( 'No description exists for this search icon. Please contact the administrators to resolve this problem.' ); }

addOnloadHook( replaceSearchIcon );

// Patch for MWSggest, broken by Wikia $(function {	if (!window.os_MWSuggestInit) {		importScriptURI(stylepath+'/common/mwsuggest.js?'+wgStyleVersion);	} });

// Move interwiki language links template to sidebar $(document).ready( function {	if( document.getElementById("p-lang") ) {		document.getElementById("column-one").appendChild(document.getElementById("p-lang"));	} } );

/* */

window.BackToTopModern = true;

/* */

importScript( 'User:Grunny/ajaxcloakrequest.js' );

// onload stuff var firstRun = true;

function loadFunc { if( firstRun ) { firstRun = false; } else { return; }

window.pageName = wgPageName; window.storagePresent = (typeof(globalStorage) != 'undefined');

// DEPRECATED if( document.getElementById('infoboxinternal') != null && document.getElementById('infoboxend') != null ) { document.getElementById('infoboxend').innerHTML = '[Hide]'; }

// Upload form - need to run before adding hide buttons if ( wgCanonicalSpecialPageName === 'Upload' ) { setupUploadForm; }

addHideButtons;

if( document.getElementById('mp3-navlink') !== null ) { document.getElementById('mp3-navlink').onclick = onArticleNavClick; document.getElementById('mp3-navlink').getElementsByTagName('a')[0].href = 'javascript:void(0)'; }

if( window.storagePresent ) { initVisibility; }

fillEditSummaries; fillPreloads;

substUsername; substUsernameTOC; rewriteTitle; showEras('title-eraicons'); showEras('title-shortcut'); rewriteHover; addAlternatingRowColors; // replaceSearchIcon; this is now called from MediaWiki:Monobook.js	fixSearch; hideContentSub;

var body = document.getElementsByTagName('body')[0]; var bodyClass = body.className;

if( !bodyClass || (bodyClass.indexOf('page-') === -1) ) { var page = window.pageName.replace(/\W/g, '_'); body.className += ' page-' + page; }

if( typeof(onPageLoad) != "undefined" ) { onPageLoad; } }

function infoboxToggle { var page = window.pageName.replace(/\W/g, '_'); var nowShown;

if(document.getElementById('infoboxtoggle').innerHTML == '[Hide]') { document.getElementById('infoboxinternal').style.display = 'none'; document.getElementById('infoboxtoggle').innerHTML = '[Show]'; nowShown = false; } else { document.getElementById('infoboxinternal').style.display = 'block'; document.getElementById('infoboxtoggle').innerHTML = '[Hide]'; nowShown = true; }

if(window.storagePresent) { var storage = globalStorage[window.location.hostname]; storage.setItem('infoboxshow-' + page, nowShown); } }

/** * jQuery version of Sikon's fillEditSummaries * @author Grunny */ function fillEditSummaries {

if( !$( '#wpSummaryLabel' ).length ) { return; }	var	summaryOptionsHtml = '', $summaryOptionsList, $summaryLabel = $( '#wpSummaryLabel' );

$.get( wgScript, { title: 'Template:Stdsummaries', action: 'raw', ctype: 'text/plain' } ).done( function( data ) {		var lines = data.split( '\n' );		for( var i = 0; i < lines.length; i++ ) {			var value = ( lines[i].indexOf( '-- ' ) === 0 ) ? lines[i].substring(3) : "";			summaryOptionsHtml += '' + lines[i] + ' ';		}		$summaryOptionsList = $( ' ' ).attr( 'id', 'stdEditSummaries' ).html( summaryOptionsHtml ).change( function { var value = $( this ).val; if ( value !== '' ) { if( skin === 'oasis' ) { $( '#wpSummary' ).text( value ); } else { $( '#wpSummary' ).val( value ); }			}		} );

$summaryLabel.prepend( 'Standard summaries: ', $summaryOptionsList, ' ' ); } );

}

/** * jQuery version of Sikon's fillPreloads * @author Grunny */ function fillPreloads {

if( !$( '#lf-preload' ).length ) { return; }	var	preloadOptionsHtml = '', $preloadOptionsList;

$( '#lf-preload' ).attr( 'style', 'display: block' );

$.get( wgScript, { title: 'Template:Stdpreloads', action: 'raw', ctype: 'text/plain' } ).done( function( data ) {		var lines = data.split( '\n' );		for( var i = 0; i < lines.length; i++ ) {			var value = ( lines[i].indexOf( '-- ' ) === 0 ) ? lines[i].substring(3) : "";			preloadOptionsHtml += '' + lines[i] + ' ';		}		$preloadOptionsList = $( ' ' ).attr( 'id', 'stdSummaries' ).html( preloadOptionsHtml ).change( function { var value = $( this ).val; if ( value !== '' ) { value = 'Template:' + value + '/preload'; value = value.replace( ' ', '_' ); $.get( wgScript, { title: value, action: 'raw', ctype: 'text/plain' } ).done( function( data ) {					insertAtCursor( document.getElementById( 'wpTextbox1' ), data );				} ); }		} );

$( '#lf-preload-cbox' ).html( $preloadOptionsList ); } );

$( '#lf-preload-pagename' ).html( '' ); $( '#lf-preload-button' ).html( '' );

}

function doCustomPreload { var value = $( '#lf-preload-pagename > input' ).val; value = value.replace( ' ', '_' ); $.get( wgScript, { title: value, action: 'raw', ctype: 'text/plain' } ).done( function( data ) {		insertAtCursor( document.getElementById( 'wpTextbox1' ), data );	} ); }

// ============================================================ // BEGIN JavaScript title rewrite -- jQuery version and new wikia skin fixes by Grunny

function rewriteTitle { if( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) { return; }

if( $('#title-meta').length == 0 ) { return; }

var newTitle = $('#title-meta').html; if( skin == "oasis" ) { $('header.WikiaPageHeader > h1').html(' ' + newTitle + ' '); $('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html + ';'); } else { $('.firstHeading').html(' ' + newTitle + ' '); $('.firstHeading').attr('style','text-align:' + $('#title-align').html + ';'); } }

function showEras(className) { if( skin == 'oasis' ) { return; }

if( typeof( SKIP_ERAS ) != 'undefined' && SKIP_ERAS ) return;

var titleDiv = document.getElementById( className );

if( titleDiv == null || titleDiv == undefined ) return;

var cloneNode = titleDiv.cloneNode(true); var firstHeading = getFirstHeading; firstHeading.insertBefore(cloneNode, firstHeading.childNodes[0]); cloneNode.style.display = "block"; } // END JavaScript title rewrite

function initVisibility { var storage = globalStorage[window.location.hostname];

var page = window.pageName.replace(/\W/g,'_'); var show = storage.getItem('infoboxshow-' + page);

if( show == 'false' ) { infoboxToggle; }

var hidables = getElementsByClass('hidable');

for(var i = 0; i < hidables.length; i++) { show = storage.getItem('hidableshow-' + i + '_' + page);

if( show == 'false' ) { var content = getElementsByClass('hidable-content', hidables[i]); var button = getElementsByClass('hidable-button', hidables[i]);

if( content != null && content.length > 0 &&				button != null && button.length > 0 && content[0].style.display != 'none' ) {				button[0].onclick('bypass'); }		} else if( show == 'true' ) { var content = getElementsByClass('hidable-content', hidables[i]); var button = getElementsByClass('hidable-button', hidables[i]);

if( content != null && content.length > 0 &&				button != null && button.length > 0 && content[0].style.display == 'none' ) {				button[0].onclick('bypass'); }		}	} }

function onArticleNavClick { var div = document.getElementById('mp3-nav');

if( div.style.display == 'block' ) div.style.display = 'none'; else div.style.display = 'block'; }

function addAlternatingRowColors { var infoboxes = getElementsByClass('infobox', document.getElementById('content'));

if( infoboxes.length == 0 ) return;

for( var k = 0; k < infoboxes.length; k++ ) { var infobox = infoboxes[k];

var rows = infobox.getElementsByTagName('tr'); var changeColor = false;

for( var i = 0; i < rows.length; i++ ) { if(rows[i].className.indexOf('infoboxstopalt') != -1) break;

var ths = rows[i].getElementsByTagName('th');

if( ths.length > 0 ) { continue; }

if(changeColor) rows[i].style.backgroundColor = '#f9f9f9'; changeColor = !changeColor; }	} }

function addHideButtons { var hidables = getElementsByClass('hidable');

for( var i = 0; i < hidables.length; i++ ) { var box = hidables[i]; var button = getElementsByClass('hidable-button', box, 'span');

if( button != null && button.length > 0 ) { button = button[0];

button.onclick = toggleHidable; button.appendChild( document.createTextNode('[Hide]') );

if( new ClassTester('start-hidden').isMatch(box) ) button.onclick('bypass'); }	} }

function toggleHidable(bypassStorage) { var parent = getParentByClass('hidable', this); var content = getElementsByClass('hidable-content', parent); var nowShown;

if( content != null && content.length > 0 ) { content = content[0];

if( content.style.display == 'none' ) { content.style.display = content.oldDisplayStyle; this.firstChild.nodeValue = '[Hide]'; nowShown = true; } else { content.oldDisplayStyle = content.style.display; content.style.display = 'none'; this.firstChild.nodeValue = '[Show]'; nowShown = false; }

if( window.storagePresent && ( typeof( bypassStorage ) == 'undefined' || bypassStorage != 'bypass' ) ) { var page = window.pageName.replace(/\W/g, '_'); var items = getElementsByClass('hidable'); var item = -1;

for( var i = 0; i < items.length; i++ ) { if( items[i] == parent ) { item = i;					break; }			}

if( item == -1 ) { return; }

var storage = globalStorage[window.location.hostname]; storage.setItem('hidableshow-' + item + '_' + page, nowShown); }	} }

/*   Replaces  with the name of the user browsing the page. Requires copying Template:USERNAME. function substUsername { $('.insertusername').html(wgUserName); }

function substUsernameTOC { var toc = $('#toc'); var userpage = $('#pt-userpage');

if( !userpage || !toc ) return;

var username = $('#pt-userpage').children(':first-child').html; $('span.toctext:not(:has(*)), span.toctext i', toc).each(function	{		$(this).html($(this).html.replace(' ', username));	}); }

// Reskin parser script from Uncyclopedia:MediaWiki:Uncyclopedia.js skinjs = { "Logout": "Logout.js" }

var re = RegExp("(.*) - Wookieepedia, the Star Wars Wiki"); var matches = re.exec(document.title);

var skinNamejs;

if (matches) { if (skinjs[matches[1]] != undefined) { skinNamejs = (skinjs[matches[1]].length > 0) ? skinjs[matches[1]] : matches[1] + '.js'; document.write(' '); } }

function fixSearch { var button = document.getElementById('searchSubmit');

if( button ) button.name = 'go'; }

/** * Start upload form customisations * @author Green tentacle */

function setupUploadForm{ // Check if cookie has been set for form style. Overrides URL parameter if set. var formstyle = getCookie("uploadform");

$("#uploadBasicLinkJS").show; $("#uploadTemplateNoJS").hide;

var wpLicense = $('#wpLicense');

if ( wpLicense.length && window.location.search.indexOf('wpForReUpload=1') == -1){ if (formstyle == "guided" || (formstyle == "" && window.location.search.indexOf('basic=true') == -1)){ // Add link to basic form $("#uploadtext").prepend(' Switch to basic upload form ');

// Stretch table to full width $('#mw-htmlform-description').css('width', '100%');

// Bind upload button to verify function $('#mw-upload-form').bind('submit', verifySummary);

// Hide existing rows var rows = $('#mw-htmlform-description').find('tr'); $('tr.mw-htmlform-field-HTMLTextAreaField').hide; $('tr.mw-htmlform-field-HTMLTextAreaField').next.detach;

$('#mw-htmlform-description').addClass('hidable start-hidden');

// Add new required rows rows.eq(1).after(' Source:  '); $('#mw-htmlform-description').append(' '); var tbody1 = $('#mw-htmlform-description').children('tbody').eq(0); tbody1.append(' Description: <textarea id="descriptionBox" cols="60" rows="2" style="overflow: auto;"> '); tbody1.append(' <td colspan="2" style="text-align: center;">Optional fields  ');

// Add new optional rows var tbody2 = $('#mw-htmlform-description').children('tbody').eq(1); tbody2.append(' <td class="mw-label" style="width: 125px;">Attention: <td class="mw-input"><textarea id="attentionBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Original designer / artist: <td class="mw-input"><textarea id="authorBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Conversion / editing / upload information: <td class="mw-input"><textarea id="filespecsBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Other versions / source images: <td class="mw-input"><textarea id="versionsBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Artist categories: <td class="mw-input"><textarea id="catartistBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Licensee categories: <td class="mw-input"><textarea id="catlicenseeBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Subject categories: <td class="mw-input"><textarea id="catsubjectBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Type categories: <td class="mw-input"><textarea id="cattypeBox" cols="60" rows="2" style="overflow: auto;"> '); } else { // Old style form just needs Information template in the summary box $('#wpUploadDescription').val('==Summary==\r\n');

// Add link to guided form $("#uploadtext").prepend(' Switch to guided upload form</a> '); }	} }

function verifySummary{ var wpLicense = document.getElementById('wpLicense');

// Check for licensing if ( wpLicense.value == "" ){ alert('Licensing must be completed.'); return false; }

// Check for source if ( document.getElementById('sourceBox').value == "" ){ alert('Source must be completed.'); return false; }

var strBuilder = '==Summary==\r\n';

document.getElementById('wpUploadDescription').value = strBuilder;

wpLicense.selectedIndex = 0;

return true; }

/** * End upload form customisations */

/************************************************************ * Functions.js stuff * Deprecated, most of these functions will be removed slowly ************************************************************/

/*   getElementsByClass, which complements getElementById and getElementsByTagName, returns an array of all subelements of node that are tagged with a specific CSS class (searchClass) and are of the tag name tag. If tag is null, it searches for any suitable elements regardless of the tag name. Example: getElementsByClass('infobox', document.getElementById('content'), 'div') selects the same elements as the CSS declaration #content div.infobox function getElementsByClass(searchClass, node, tag) {	var classElements = new Array;

if(node == null) node = document;

if(tag == null) tag = '*';

var els = node.getElementsByTagName(tag); var elsLen = els.length; var tester = new ClassTester(searchClass);

for(i = 0, j = 0; i < elsLen; i++) {		if(tester.isMatch(els[i])) {			classElements[j] = els[i]; j++; }	}	return classElements; }

function ClassTester(className) {	this.regex = new RegExp("(^|\\s)" + className + "(\\s|$)"); }

ClassTester.prototype.isMatch = function(element) {	return this.regex.test(element.className); } /*   end getElementsByClass

function insertAtCursor(myField, myValue) { //IE support if (document.selection) {		myField.focus; sel = document.selection.createRange; sel.text = myValue; }	//MOZILLA/NETSCAPE support else if(myField.selectionStart || myField.selectionStart == '0') {		var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); }	else {		myField.value += myValue; } }

function getFirstHeading { var elements = getElementsByClass('firstHeading', document.getElementById('content'), 'h1'); return (elements != null && elements.length > 0) ? elements[0] : null; }

/*   Returns the element's nearest parent that has the specified CSS class. function getParentByClass(className, element) { var tester = new ClassTester(className); var node = element.parentNode;

while(node != null && node != document) {		if(tester.isMatch(node)) return node;

node = node.parentNode; }

return null; }

/*   Performs dynamic hover class rewriting to work around the IE6 :hover bug (needs CSS changes as well) function rewriteHover { var gbl = document.getElementById("hover-global");

if(gbl == null) return;

var nodes = getElementsByClass("hoverable", gbl);

for (var i = 0; i < nodes.length; i++) { nodes[i].onmouseover = function { this.className += " over"; }		nodes[i].onmouseout = function { this.className = this.className.replace(new RegExp(" over\\b"), ""); }	} } /************************************************************ * End old Functions.js stuff * Deprecated, most of these functions will be removed slowly ************************************************************/

$( loadFunc );

///////////////////////////////////////////////////////////////////////////////////////////////////////////

// ADVANCED AJAX AUTO-REFRESHING ARTICLES // Code originally by "pcj" of Wowpedia // Maintenance, cleanup, style and bug fixes by Grunny (https://starwars.wikia.com/wiki/User:Grunny)

///////////////////////////////////////////////////////////////////////////////////////////////////////////

var	ajaxIndicator = 'https://images.wikia.nocookie.net/dev/images/8/82/Facebook_throbber.gif', ajaxTimer, ajaxRefresh = 60000, refreshText = 'Automatically refresh', refreshHover = 'Enable auto-refreshing page loads', doRefresh = true;

if ( !window.ajaxPages ) { var ajaxPages = [ 'Special:RecentChanges', 'Special:Watchlist', 'Special:Log', 'Special:NewFiles', 'Special:AbuseLog' ]; } if ( !window.ajaxCallAgain ) { var ajaxCallAgain = []; } if( typeof AjaxRCRefreshText == "string" ) { refreshText = AjaxRCRefreshText; } if( typeof AjaxRCRefreshHoverText == "string" ) { refreshHover = AjaxRCRefreshHoverText; }

/** * Sets the cookie * @param c_name string Name of the cookie * @param value string 'on' or 'off' * @param expiredays integer Expiry time of the cookie in days */ function setCookie( c_name, value, expiredays ) { var exdate = new Date; exdate.setDate( exdate.getDate + expiredays); document.cookie = c_name + "=" + escape(value) + ( ( expiredays === null ) ? "" : ";expires=" + exdate.toGMTString ); }

/** * Gets the cookie * @param c_name string Cookie name * @return The cookie name or empty string */ function getCookie( c_name ) { if ( document.cookie.length > 0 ) { var c_start = document.cookie.indexOf( c_name + "=" ); if ( c_start !== -1 ) { c_start = c_start + c_name.length + 1; var c_end = document.cookie.indexOf( ";", c_start ); if ( c_end === -1 ) { c_end = document.cookie.length; }			return unescape( document.cookie.substring( c_start, c_end ) ); }	}	return ""; }

/** * Main function to start the Auto-refresh process */ function preloadAJAXRL { var	ajaxRLCookie = ( getCookie( "ajaxload-" + wgPageName ) == "on" ) ? true : false, appTo = ( $( '#WikiaPageHeader' ).length ) ? $( '#WikiaPageHeader' ) : ( $( '#AdminDashboardHeader' ).length ? $( '#AdminDashboardHeader > h1' ) : $( '.firstHeading' ) ); appTo.append( ' <span style="border-bottom: 1px dotted; cursor: help;" id="ajaxToggleText" title="' + refreshHover + '">' + refreshText + ': <input type="checkbox" style="margin-bottom: 0;" id="ajaxToggle"> <img src="' + ajaxIndicator + '" style="vertical-align: baseline; float: none;" border="0" alt="Refreshing page" /> ' ); if ( $( '.mw-rc-openarrow a' ).length ) { $( '.mw-rc-openarrow a' ).removeAttr( 'href' ).css( 'cursor', 'pointer' ); }	$( '#ajaxLoadProgress' ).ajaxSend( function ( event, xhr, settings ) {		if ( location.href == settings.url ) {			$( this ).show;		}	} ).ajaxComplete ( function ( event, xhr, settings ) {		var	$collapsibleElements = $( '#mw-content-text' ).find( '.mw-collapsible' );		if ( location.href == settings.url ) {			$( this ).hide;			for ( var i = 0; i < ajaxCallAgain.length; i++ ) {				ajaxCallAgain[i];			}			if ( $collapsibleElements.length ) {				$collapsibleElements.makeCollapsible;			}			if ( mw.config.get( 'wgNamespaceNumber' ) === -1 && mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Recentchanges' ) {				mw.special.recentchanges.init;				if ( $( '.mw-recentchanges-table' ).find( '.WikiaDropdown' ).length ) {					RecentChangesLocal.init;				}

if ( $( '.mw-rc-openarrow a' ).length ) { $( '.mw-rc-openarrow a' ).removeAttr( 'href' ).css( 'cursor', 'pointer' ); }			}		}	} );	$( '#ajaxToggle' ).click( toggleAjaxReload );	$( '#ajaxToggle' ).attr( 'checked', ajaxRLCookie);	if ( getCookie( "ajaxload-" + wgPageName ) == "on" ) {		loadPageData;	} }

/** * Turn refresh on and off by toggling the checkbox */ function toggleAjaxReload { if ( $( '#ajaxToggle' ).prop( 'checked' ) === true ) { setCookie( "ajaxload-" + wgPageName, "on", 30 ); doRefresh = true; loadPageData; } else { setCookie( "ajaxload-" + wgPageName, "off", 30 ); doRefresh = false; clearTimeout( ajaxTimer ); } }

/** * Does the actual refresh */ function loadPageData { var cC = '#mw-content-text'; $( cC ).load( location.href + " " + cC + " > *", function ( data ) {		if ( doRefresh ) {			ajaxTimer = setTimeout( loadPageData, ajaxRefresh );		}	} ); }

/** * Load the script on specific pages */ $( function {	for ( var x = 0; x < ajaxPages.length; x++ ) {		if ( wgPageName == ajaxPages[x] && $( '#ajaxToggle' ).length === 0 ) {			preloadAJAXRL;		}	} } );

/** * Hack: copy the RC filter JS since it can't be accessed */ var RecentChangesLocal = { init: function { this.$table = $('.mw-recentchanges-table'); this.$dropdown = this.$table.find('.WikiaDropdown'); this.$submit = this.$table.find('input[type="submit"]'); this.$submit.on('click.RecentChangesDropdown', $.proxy(this.saveFilters, this)); this.$submit.removeAttr('disabled'); //FF clean

this.dropdown = new Wikia.MultiSelectDropdown(this.$dropdown); this.dropdown.on('change', $.proxy(this.onChange, this));

},

saveFilters: function(event) { var self = this;

event.preventDefault;

self.dropdown.disable; self.$submit.attr('disabled', 'disabled');

if(self.dropdown.getSelectedValues.length == 0) { self.dropdown.doSelectAll(true); }

$.nirvana.sendRequest({			controller: 'RecentChangesController',			method: 'saveFilters',			data: {				filters: self.dropdown.getSelectedValues			},			type: 'POST',			format: 'json',			callback: function(data) {				window.location.reload;			}		}); } };

///////////////////////////////////////////////////////////////////////////////////////////////////////////

// END OF AJAX AUTO-REFRESH

///////////////////////////////////////////////////////////////////////////////////////////////////////////

//Link FA

var FA_enabled = true;

function addfaicon { // if disabled if (!FA_enabled) return; var pLang = document.getElementById("p-lang"); if (!pLang) return; var lis = pLang.getElementsByTagName("li"); for (var i = 0; i < lis.length; i++) { var li = lis[i]; // only links with a corresponding Link_FA template are interesting if (!document.getElementById(li.className + "-fa"))  continue; // additional class so the template can be hidden with CSS li.className += " FA"; // change title (mouse over) li.title = "This article is rated as featured article."; } } addOnloadHook(addfaicon);

/* Magic edit intro. Copied from Wikipedia's MediaWiki:Common.js * modified for use in both Monaco and Monobook skins by Sikon * Section edit links added by Green tentacle * New Wikia skin support by Grunny */ function addEditIntro(name) { // Top link if( skin == 'oasis' ) { $('a[data-id="edit"]').attr('href',$('a[data-id="edit"]').attr('href') + '&editintro=' + name); $('span.editsection > a').each( function {			$(this).attr('href',$(this).attr('href') + '&editintro=' + name);		} ); } else { var el = document.getElementById('ca-edit');

if( typeof(el.href) == 'undefined' ) { el = el.getElementsByTagName('a')[0]; }

if (el) el.href += '&editintro=' + name;

// Section links var spans = document.getElementsByTagName('span'); for ( var i = 0; i < spans.length; i++ ) { el = null;

if (spans[i].className == 'editsection') { el = spans[i].getElementsByTagName('a')[0]; if (el) el.href += '&editintro=' + name; } else if (spans[i].className == 'editsection-upper') { el = spans[i].getElementsByTagName('a')[0]; if (el) el.href += '&editintro=' + name; }		}	} }

$( function {	if ( wgNamespaceNumber === 0 ) {		var cats = document.getElementById( 'mw-normal-catlinks' );		if ( !cats ) {			return;		}		cats = cats.getElementsByTagName( 'a' );		for ( var i = 0; i < cats.length; i++ ) {			if ( cats[i].title === 'Category:Wookieepedia featured articles' ) {				addEditIntro( 'Template:Featured_editintro' );				break;			} else if ( cats[i].title === 'Category:Wookieepedia good articles' ) {				addEditIntro( 'Template:Good_editintro' );				break;			} else if ( cats[i].title === 'Category:Wookieepedia comprehensive articles' ) {				addEditIntro( 'Template:Comprehensive_editintro' );				break;			} else if ( cats[i].title === 'Category:Articles undergoing major edits' || cats[i].title === 'Category:Works in progress' ) {				addEditIntro( 'Template:Inuse_editintro‎' );				break;			} else if ( wgPageName === 'Template:DYK editintro' ) {				addEditIntro( 'Template:Good_editintro' ); break; }		}	} else if ( wgPageName === 'Template:DidYouKnow' ) { addEditIntro( 'Template:DYK_editintro' ); } } );

// Main Page JS transform. Originally from Wikipedia:MediaWiki:Monobook.js/Wikipedia:MediaWiki:Common.js and may be further modified for local use. function mainPageRenameNamespaceTab { try { var Node = document.getElementById( 'ca-nstab-main' ).firstChild; if ( Node.textContent ) {     // Per DOM Level 3 Node.textContent = 'Main Page'; } else if ( Node.innerText ) { // IE doesn't handle .textContent Node.innerText = 'Main Page'; } else {                      // Fallback Node.replaceChild( Node.firstChild, document.createTextNode( 'Main Page' ) ); }	} catch(e) { // bailing out! } }

if ( wgTitle == 'Main Page' && ( wgNamespaceNumber == 0 || wgNamespaceNumber == 1 ) ) { addOnloadHook( mainPageRenameNamespaceTab ); } /** Archive edit tab disabling ************************************* * Disables the edit tab on old forum topic pages to stop noobs bumping old topics. * Page can still be edited by going via the edit tab on the history etc, or by * typing the edit address manually. * By Spang * Monaco support by User:Uberfuzzy * Oasis support by User:Uberfuzzy * Removal of section edit buttons and new section tab on talk pages added by Grunny * User:/User talk: support and styling in new skin by Grunny */ function disableOldForumEdit { if( typeof( enableOldForumEdit ) != 'undefined' && enableOldForumEdit ) { return; }	if( !document.getElementById('old-forum-warning') ) { return; }

if( skin == 'oasis' ) { if( wgNamespaceNumber == 2 || wgNamespaceNumber == 3 ) { $("#WikiaUserPagesHeader .wikia-menu-button li a:first").html('Archived').removeAttr('href').attr('style', 'color: darkgray;'); $('span.editsection').remove; return; } else { $("#WikiaPageHeader .wikia-menu-button a:first").html('Archived').removeAttr('href').attr('style', 'color: darkgray;'); $('span.editsection').remove; return; }	}

if( !document.getElementById('ca-edit') ) { return; }

if( skin == 'monaco' ) { editLink = document.getElementById('ca-edit'); } else if( skin == 'monobook' ) { editLink = document.getElementById('ca-edit').firstChild; } else { return; }

editLink.removeAttribute('href', 0); editLink.removeAttribute('title', 0); editLink.style.color = 'gray'; editLink.innerHTML = 'Archived';

$('span.editsection-upper').remove; $('span.editsection').remove;

appendCSS( '#control_addsection, #ca-addsection { display: none !important; }' ); } addOnloadHook( disableOldForumEdit );

//Removes the "Featured on:" line on File pages -- By Grunny addOnloadHook( function {	if ( wgNamespaceNumber == 6 && $('#file').length != 0 ) {		$('#file').html($('#file').html.replace(/Featured on\:(.*?)\<br\>/, ''));	} } );

/** * Show/hide for media timeline -- Grunny **/ $( function {	if( !$( '.timeline-toggles' ).length ) {		return;	}	$( '.timeline-toggles' ).find( 'td > a' ).click( function  { var	hideBtnClass = $( this ).parent.attr( 'class' ), $hideContent = $( 'tr.' + hideBtnClass ); if( !$hideContent.length ) { return; }		$hideContent.toggle; if ( $( this ).text.indexOf( 'hide' ) >= 1 ) { $( this ).text( $( this ).text.replace( 'hide', 'show' ) ); } else { $( this ).text( $( this ).text.replace( 'show', 'hide' ) ); }	} ); } );

/** * Hides the link to parent pages from subpages if is included **/ function hideContentSub {	if( skin === 'oasis' ) { if ($("#hideContentSub").length > 0) { $("#WikiaPageHeader h2").hide; }	} else { if ($("#hideContentSub").length > 0) { $("#contentSub span.subpages").hide; }	} }

//

/* <pre style="overflow: scroll; height: 25em"> */

/*   This file is a collection of reusable functions from Wookieepedia.

/*   This global variable specifies if client-side persistent storage is available. Currently, only Firefox 2 supports this specification. On Wookieepedia, this global storage is used to store information about which infoboxes are hidden. window.storagePresent = (typeof(globalStorage) != 'undefined');

/*   Adds a trim method to string variables. String.prototype.trim = function { return this.replace(/^\s+|\s+$/g, ""); };

/*   Searches an array for an element and returns its index, or -1 if it's not in the array. function arrayFind(array, value) {   for(var i = 0; i < array.length; i++) {       if(array[i] == value) return i;   } return -1; }

/*   Removes the first occurrence of an element in an array, if it is there. function arrayRemove(array, value) {   var i = arrayFind(array, value); if(i != -1) array.splice(i, 1); }

/*	the ContentLoader class to encapsulate "creative differences" with XHR Usage: - construct a ContentLoader object: var loader = new ContentLoader; - set necessary state parameters (via fields); e.g. loader.myvar = 'mytext'; - set the callback: loader.callback = myfunc; - send the request: loader.send(url, postdata = null, contentType = 'application/x-www-form-urlencoded'); (if postdata isn't null or omitted, POST is used, otherwise GET) - the callback function is called when the content is loaded - the ContentLoader object is this - the raw response data is this.text - the XML DOM object, if any, is this.document function ContentLoader {   this.cache = true; }

ContentLoader.prototype.enableCache = function(caching) {   this.cache = (caching == null) ? true : this.cache; }

ContentLoader.prototype.createRequest = function {	if(typeof(XMLHttpRequest) != 'undefined') {		return new XMLHttpRequest; }	else if(typeof(ActiveXObject) != 'undefined') {		return new ActiveXObject("Msxml2.XMLHTTP"); }	return null; }

ContentLoader.prototype.send = function(url, postdata, contentType) {	var method = (postdata == null) ? 'GET' : 'POST'; this.request = this.createRequest; this.request.open(method, url);

if(!this.cache) this.request.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" );

var request = this.request; var loader = this; if(postdata == null) {	   if(contentType == null) contentType = 'application/x-www-form-urlencoded'; request.setRequestHeader('Content-type', contentType); }	var f = function {   	if(request.readyState == 4) {   		loader.text = request.responseText; loader.document = request.responseXML; request = null; loader.request = null; loader.callback; }   }	this.request.onreadystatechange = f;	this.request.send(postdata); } /*	end ContentLoader

/*   Source: http://www.dustindiaz.com/getelementsbyclass/ getElementsByClass, which complements getElementById and getElementsByTagName, returns an array of all subelements of node that are tagged with a specific CSS class (searchClass) and are of the tag name tag. If tag is null, it searches for any suitable elements regardless of the tag name. Example: getElementsByClass('infobox', document.getElementById('content'), 'div') selects the same elements as the CSS declaration #content div.infobox function getElementsByClass(searchClass, node, tag) {	var classElements = new Array;

if(node == null) node = document;

if(tag == null) tag = '*';

var els = node.getElementsByTagName(tag); var elsLen = els.length; var tester = new ClassTester(searchClass);

for(i = 0, j = 0; i < elsLen; i++) {		if(tester.isMatch(els[i])) {			classElements[j] = els[i]; j++; }	}	return classElements; }

function ClassTester(className) {   this.regex = new RegExp("(^|\\s)" + className + "(\\s|$)"); }

ClassTester.prototype.isMatch = function(element) {   return this.regex.test(element.className); } /*   end getElementsByClass

/*   Returns the parameter as it appears in the query string. Equivalent to $_GET[p] in PHP. function queryString(p) {   var re = RegExp('[&?]' + p + '=([^&]*)'); var matches;

if(matches = re.exec(document.location)) {       try {           return decodeURI(matches[1]); }       catch(e) { } }

return null; } /*   end temporary per-page unique CSS (Splarka)

/*   Dynamically load a combobox's content by pagename (e. g. Template:Stdsummaries) The page should be of the same format as http://starwars.wikia.com/wiki/Template:Stdsummaries function requestComboFill(id, page) {   var loader = new ContentLoader; loader.comboID = id; loader.callback = onComboDataArrival; loader.send('/index.php?title=' + page + '&action=raw&ctype=text/plain'); }

function onComboDataArrival {   fillCombo(this.text, this.comboID); }

function fillCombo(text, comboid) {   var combo = document.getElementById(comboid); var lines = text.split("\n"); if( combo == null ) { return; }

for(var i = 0; i < lines.length; i++) {       var value = lines[i].indexOf("-- ") == 0 ? lines[i].substring(3) : ""; var option = document.createElement('option'); option.setAttribute('value', value); option.appendChild(document.createTextNode(lines[i])); combo.appendChild(option); } } /*   end combo fill code

/*   Loads the current source of the page "pagename" (as stored in the database) and inserts it at the cursor position function doPreload(pagename) {   var loader = new ContentLoader; loader.callback = onPreloadArrival; loader.send('/index.php?title=' + pagename + '&action=raw&ctype=text/plain'); }

function insertAtCursor(myField, myValue) {   //IE support if (document.selection) {       myField.focus; sel = document.selection.createRange; sel.text = myValue; }   //MOZILLA/NETSCAPE support else if(myField.selectionStart || myField.selectionStart == '0') {       var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); }   else {       myField.value += myValue; } }

function onPreloadArrival {   insertAtCursor(document.getElementById('wpTextbox1'), this.text); } /*   end preload code

/*   Returns h1.firstHeading (the page title element). function getFirstHeading {   var elements = getElementsByClass('firstHeading', document.getElementById('content'), 'h1'); return (elements != null && elements.length > 0) ? elements[0] : null; }

/*   Returns the element's nearest parent that has the specified CSS class. function getParentByClass(className, element) {   var tester = new ClassTester(className); var node = element.parentNode; while(node != null && node != document) {       if(tester.isMatch(node)) return node; node = node.parentNode; }   return null; }

/*   Makes the image on the search form, if one is present, point to the search page instead of the Wikia main page. function rewriteSearchFormLink { if( $('#searchform').length == 0 ) { return; }	var links = document.getElementById('searchform').getElementsByTagName('a');

if( links.length > 0 ) { links[0].href = wgScriptPath + '/index.php?title=Special:Search&adv=1'; } }

/*   Replaces  with the name of the user browsing the page. Requires copying Template:USERNAME. function substUsername { $('.insertusername').html(wgUserName); }

/*   Performs dynamic hover class rewriting to work around the IE6 :hover bug (needs CSS changes as well) function rewriteHover { var gbl = document.getElementById("hover-global");

if(gbl == null) return;

var nodes = getElementsByClass("hoverable", gbl);

for (var i = 0; i < nodes.length; i++) { nodes[i].onmouseover = function { this.className += " over"; }   nodes[i].onmouseout = function { this.className = this.className.replace(new RegExp(" over\\b"), ""); } } }

/*   to call in onload hooks function initFunctionsJS {   storePageName; }

function storePageName {   window.pageName = wgPageName; }

/* */

/* <pre style="overflow: scroll; height: 25em"> */

function setupUploadForm{ // Check if cookie has been set for form style. Overrides URL parameter if set. var formstyle = getCookie("uploadform");

$("#uploadBasicLinkJS").show; $("#uploadTemplateNoJS").hide;

var wpLicense = $('#wpLicense');

if ( wpLicense.length && window.location.search.indexOf('wpForReUpload=1') == -1){ if (formstyle == "guided" || (formstyle == "" && window.location.search.indexOf('basic=true') == -1)){ // Add link to basic form $("#uploadtext").prepend(' Switch to basic upload form</a> ');

// Stretch table to full width $('#mw-htmlform-description').css('width', '100%');

// Bind upload button to verify function $('#mw-upload-form').bind('submit', verifySummary);

// Hide existing rows var rows = $('#mw-htmlform-description').find('tr'); $('tr.mw-htmlform-field-HTMLTextAreaField').hide; $('tr.mw-htmlform-field-HTMLTextAreaField').next.detach;

$('#mw-htmlform-description').addClass('hidable start-hidden');

// Add new required rows rows.eq(1).after(' <td class="mw-label" style="width: 125px;">Source: <td class="mw-input"><textarea id="sourceBox" cols="60" rows="2" style="overflow: auto;"> '); $('#mw-htmlform-description').append('<tbody class="hidable-content"> '); var tbody1 = $('#mw-htmlform-description').children('tbody').eq(0); tbody1.append(' <td class="mw-label" style="width: 125px;">Description: <td class="mw-input"><textarea id="descriptionBox" cols="60" rows="2" style="overflow: auto;"> '); tbody1.append(' <td colspan="2" style="text-align: center;">Optional fields  ');

// Add new optional rows var tbody2 = $('#mw-htmlform-description').children('tbody').eq(1); tbody2.append(' <td class="mw-label" style="width: 125px;">Attention: <td class="mw-input"><textarea id="attentionBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Original designer / artist: <td class="mw-input"><textarea id="authorBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Conversion / editing / upload information: <td class="mw-input"><textarea id="filespecsBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Other versions / source images: <td class="mw-input"><textarea id="versionsBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Artist categories: <td class="mw-input"><textarea id="catartistBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Licensee categories: <td class="mw-input"><textarea id="catlicenseeBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Subject categories: <td class="mw-input"><textarea id="catsubjectBox" cols="60" rows="2" style="overflow: auto;"> '); tbody2.append(' <td class="mw-label" style="width: 125px;">Type categories: <td class="mw-input"><textarea id="cattypeBox" cols="60" rows="2" style="overflow: auto;"> '); } else { // Old style form just needs Information template in the summary box $('#wpUploadDescription').val('==Summary==\r\n');

// Add link to guided form $("#uploadtext").prepend(' Switch to guided upload form</a> '); }	} }

function verifySummary{ var wpLicense = document.getElementById('wpLicense');

// Check for licensing if ( wpLicense.value == "" ){ alert('Licensing must be completed.'); return false; }

// Check for source if ( document.getElementById('sourceBox').value == "" ){ alert('Source must be completed.'); return false; }

var strBuilder = '==Summary==\r\n';

document.getElementById('wpUploadDescription').value = strBuilder;

wpLicense.selectedIndex = 0;

return true; }

/* */

/* */ /** * * Custom preload templates for the new Wikia editor * * @author Grunny * @version 0.2 * */

function customPreloadTemplates {

if ( ( mw.config.get( 'wgAction' ) !== 'edit' && mw.config.get( 'wgCanonicalSpecialPageName' ) !== 'CreatePage' ) || !$( 'div.module_content' ).length ) { return; }

var preloadBaseHtml = ' Standard preloads: ' +			' Custom preload pagename: ';

$( 'div.module_content:first' ).append( preloadBaseHtml );

$.get( mw.config.get( 'wgScript' ), { title: 'Template:Stdpreloads', action: 'raw', ctype: 'text/plain' } ).done( function( data ) {		var	$preloadOptionsList,			lines = data.split( '\n' );

$preloadOptionsList = $( ' ' ).attr( 'id', 'stdSummaries' ).change( function {			var templateName = $( this ).val;			if ( templateName !== '' ) {				templateName = 'Template:' + templateName + '/preload';				templateName = templateName.replace( ' ', '_' );				$.get( mw.config.get( 'wgScript' ), { title: templateName, action: 'raw', ctype: 'text/plain' } ).done( function( data ) { insertAtCursor( document.getElementById( 'wpTextbox1' ), data ); } );			}		} );

for ( var i = 0; i < lines.length; i++ ) { var templateText = ( lines[i].indexOf( '-- ' ) === 0 ) ? lines[i].substring(3) : ''; $preloadOptionsList.append( $( ' ' ).val( templateText ).text( lines[i] ) ); }

$( 'div#lf-preload' ).append( $preloadOptionsList ); } );

$( '#lf-preload-pagename-w' ).html( '<input type="text" class="textbox" />' ); $( '#lf-preload-button-w' ).html( '<input type="button" class="button" value="Insert" onclick="doCustomPreloadOasis" />' );

}

$( customPreloadTemplates );

function doCustomPreloadOasis { var value = $( '#lf-preload-pagename-w > input' ).val; value = value.replace( ' ', '_' ); $.get( mw.config.get( 'wgScript' ), { title: value, action: 'raw', ctype: 'text/plain' } ).done( function( data ) {		insertAtCursor( document.getElementById( 'wpTextbox1' ), data );	} ); }

// Copied from http://avatar.wikia.com/wiki/MediaWiki:Common.js/icons.js $( function eraIconsOasis {   if ( $( '.wds-community-header' ).length ) {        $( '#PageHeader' ).prepend( $( '#title-eraicons' ).attr( 'style', 'position: absolute; right: 0px;' ) );   } else {    	$( '.WikiaPageHeader' ).append( $( '#title-eraicons' ) );    	$( '#title-eraicons' ).css( { 'position' : 'absolute', 'right' : '0', 'bottom' : '-2em' } ).show;    } } );

// Add clickable skin to Instant Expert: The Force Awakens page (temporary) if(mw.config.get('wgPageName') === "Instant_Expert:The_Force_Awakens") { var targetURL = 'http://ow.ly/W5KxR'; $('body').prepend(' </a>'); $('.clickable-skin').css({       'height': '100%',        'position': 'absolute',        'width': '100%',        'z-index': '1'    }); } /* */

// Wikia Header Button Rewrite function headerbRewrite { $('#headerButtonHub').html('Star Wars<img src="https://images.wikia.nocookie.net/__cb19979/common/skins/common/blank.gif">'); }

addOnloadHook( headerbRewrite );

document.write('<script type="text/javascript" src="/index.php?title=MediaWiki:Common.js' + '&action=raw&ctype=text/javascript"> ');

function loadFunc2 {    loadFunc; var nodes = document.getElementById("column-one").getElementsByTagName("div");

for (var i = 0; i < nodes.length; i++) {        nodes[i].onmouseover = function {            this.className += " over"; }        nodes[i].onmouseout = function {            this.className = this.className.replace(new RegExp(" over\\b"), ""); }    } }

window.onload = loadFunc2;

document.write('<script type="text/javascript" src="/index.php?title=MediaWiki:Common.js' + '&action=raw&ctype=text/javascript"> ');

/* */

mw.loader.load( '//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.js&action=raw&ctype=text/javascript' ); mw.loader.load( '//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&action=raw&ctype=text/css', 'text/css' ); mw.util.addCSS( '.referencetooltip > li > sup { display: none; }' );