MediaWiki:Monobook.js

/* MONOBOOK SIDEBAR v2.3 */ window.wgSidebar = ( window.wgSidebar || {} );

wgSidebar['Help'] = [ 'Wikizilla:About|About', 'Help|Help Pages', 'Wikizilla:Manual of Style|Manual of Style', 'Wikizilla:Policy|Policy', 'Category:Stubs|Stubs', ];

wgSidebar['Monsters'] = [ {':Category:Showa Kaiju|Showa': [ {'Godzilla': [ 'Godzilla/1954|First Generation Godzilla', 'Godzilla/Showa|Second Generation Godzilla', ]},		'Anguirus', 'Rodan/Showa|Rodan', {'Mothra': [ 'Mothra/First Generation|First Generation Mothra', 'Mothra/Second Generation|Second Generation Mothra', 'Mothra/Third Generation|Third Generation Mothra', ]},		'King Ghidorah/Showa|King Ghidorah', 'Baragon', 'Gigan', 'Megalon', 'Mechagodzilla/Showa|Mechagodzilla', ':Category:Showa Kaiju|more...', ]},	{':Category:Heisei Kaiju|Heisei': [ 'Godzilla/Heisei|Godzilla', 'Biollante', {'King Ghidorah': [ 'King Ghidorah/Heisei|King Ghidorah 1991', 'Mecha-King Ghidorah', 'King Ghidorah/Rebirth of Mothra III|King Ghidorah 1998', ]},               {'Mothra': [ 'Mothra/Heisei|Mothra 1992', 'Mothra/Rebirth of Mothra|Parent Mothra', 'Mothra Leo', ]},		'Battra', 'Rodan/Heisei|Fire Rodan', 'Godzilla Junior', 'Mechagodzilla/Heisei|Super Mechagodzilla', 'SpaceGodzilla', 'Destoroyah', ':Category:Heisei Kaiju|more...', ]},	{':Category:Monsters|Millennium': [ {'Godzilla': [ 'Godzilla/Godzilla 2000|Godzilla 1999', 'Godzilla/Godzilla vs. Megaguirus|Godzilla 2000', 'Godzilla/GMK|Godzilla 2001', 'Godzilla/Kiryu Saga|Kiryu Saga Godzilla', 'Godzilla/Final Wars|Godzilla 2004', ]},		'Orga', 'Meganulon|Meganula', 'Megaguirus', {'Mothra': [ 'Mothra/GMK|Mothra 2001', 'Mothra/Tokyo S.O.S. (Imago)|Mothra Imago 2003', 'Mothra/Tokyo S.O.S. (Larvae)|Mothra Larvae 2003', 'Mothra/Final Wars|Mothra 2004', ]},		'Kiryu', 'Kamoebas', 'Zilla', 'Monster X', ':Category:Millennium Kaiju|more...', ]},	{':Category:Monsters|Post-Millennium': [ {'Godzilla': [ 'Godzilla/2016|Shin Godzilla', 'Godzilla Filius', 'Godzilla Earth', ]},		'Servum', 'Mechagodzilla/Anime|Mechagodzilla City', 'King Ghidorah/Anime|Ghidorah', 'Mothra/Anime|Mothra', ]},	{':Category:Legendary Godzilla Kaiju|MonsterVerse': [ 'Godzilla/Legendary|Godzilla', 'M.U.T.O.', 'Rodan/Legendary|Rodan', 'Mothra/Legendary|Mothra', 'King Ghidorah/Legendary|King Ghidorah', 'King Kong', ':Category:Legendary Godzilla Kaiju|more...', ]},	{':Category:Unmade Monsters|Unmade': [ {':Category:Unmade Monsters|Showa': [ 'Robot Daughter', 'Mutant Starfish', 'Redmoon', 'Erabus', 'Hafun', 'Mogu', 'Majin Tuol', 'Gamoni', ':Category:Unmade Monsters|more...', ]},	 {':Category:Unmade Monsters|Heisei': [ 'Bagan', 'Deutalios', 'Gigamoth C Type', 'Gigamoth', 'MechaMothra', 'Berserk', 'Transforming Mechagodzilla', 'White Rodan', 'Emperor Ghidorah', 'AstroGodzilla', 'Barubaroi', 'Ghost Godzilla', 'Gryphon', ':Category:Unmade Monsters|more...', ]},	 {':Category:Unmade Monsters|Post-1999': [ 'Miba', 'Liopleurodon', 'Deathla', 'Lightning Bug', 'Fire Lion', 'The Visitor', 'Strange, dead monster|A strange, dead monster', 'Rokmutul', 'Pterodactyl', ':Category:Unmade Monsters|more...', ]},	 {':Category:Unmade Monsters|Other': [ 'Nezura', 'Nessie (Unmade film)|Nessie', 'Wyvern', 'Garasharp', 'Marukobukarappa', ':Category:Unmade Monsters|more...', ]},		':Category:Unmade Monsters|more...', ]},	{':Category:Gamera Kaiju|Gamera': [ 'Gamera', 'Barugon', 'Gyaos', 'Viras', 'Zigra', 'Legion', 'Iris', 'Toto', 'Zedus', ':Category:Gamera Kaiju|more...', ]},	{':Category:Non-Toho Kaiju|Other Non-Toho': [ 'King Kong', 'Clover', 'Guilala', 'Gappa', 'Yonggary', 'Daimajin', ':Category:Non-Toho Kaiju|more...', ]},	{':Category:Monsters|Other': [ ':Category:Comic Kaiju|Monsters from comics', ':Category:Game Characters|Monsters from games', ':Category:The Godzilla Power Hour Kaiju|Monsters from the Godzilla Power Hour', ':Category:Godzilla: The Series Kaiju|Monsters from Godzilla: The Series', ':Category:Toho Kaiju|Other monsters from Toho', ':Category:Monsters|more...', ]},	':Category:Designs|Suits/Designs', ];

wgSidebar['Film & TV'] = [ {'Showa era|Showa': [ //sub {':Category:Showa Godzilla Films|Godzilla Films': [ 'Godzilla (1954 film)|Godzilla', 'Godzilla Raids Again', 'King Kong vs. Godzilla', 'Mothra vs. Godzilla', 'Ghidorah, the Three-Headed Monster', 'Invasion of Astro-Monster', 'Ebirah, Horror of the Deep', 'Son of Godzilla', 'Destroy All Monsters', 'All Monsters Attack', 'Godzilla vs. Hedorah', 'Godzilla vs. Gigan', 'Godzilla vs. Megalon', 'Godzilla vs. Mechagodzilla', 'Terror of Mechagodzilla', ]},

{':Category:Gamera Films|Gamera Films': [ 'Gamera (1965 film)|Gamera', 'Gamera vs. Barugon', 'Gamera vs. Gyaos', 'Gamera vs. Viras', 'Gamera vs. Guiron', 'Gamera vs. Jiger', 'Gamera vs. Zigra', 'Gamera: Super Monster', ]},	 {':Category:Showa Series|Other Showa Films': [ 'Rodan (film)|Rodan', 'The Mysterians', 'Varan (film)|Varan', 'Mothra (film)|Mothra', 'Atragon (film)|Atragon', 'Frankenstein vs. Baragon', 'The War of the Gargantuas', 'King Kong Escapes', 'Space Amoeba', ':Category:Showa Series|more...', ]},         ]},

{'Heisei era|Heisei': [ //sub {':Category:Heisei Godzilla Films|Godzilla Films': [ 'The Return of Godzilla', 'Godzilla vs. Biollante', 'Godzilla vs. King Ghidorah', 'Godzilla vs. Mothra', 'Godzilla vs. Mechagodzilla II', 'Godzilla vs. SpaceGodzilla', 'Godzilla vs. Destoroyah', ]},	 {':Category:Gamera Films|Gamera Films': [ 'Gamera: Guardian of the Universe', 'Gamera 2: Attack of the Legion', 'Gamera 3: Revenge of Iris', 'Gamera the Brave', ]},	 {':Category:Rebirth of Mothra|Rebirth of Mothra': [ 'Rebirth of Mothra', 'Rebirth of Mothra II', 'Rebirth of Mothra III', ]},	 ':Category:Heisei Series|Other Heisei Films', ]},

{':Category:Millennium Godzilla Films|Millennium': [ 'Godzilla 2000: Millennium|Godzilla 2000', 'Godzilla vs. Megaguirus', 'Godzilla, Mothra and King Ghidorah: Giant Monsters All-Out Attack|Giant Monsters All-Out Attack', 'Godzilla Against Mechagodzilla', 'Godzilla: Tokyo S.O.S.', 'Godzilla: Final Wars', ]},	 {':Category:Godzilla Films|Post-Millennium': [ 'Shin Godzilla', 'Godzilla: Planet of the Monsters|GODZILLA: Planet of the Monsters', 'Godzilla: City on the Edge of Battle|GODZILLA: City on the Edge of Battle', 'Godzilla: The Planet Eater|GODZILLA: The Planet Eater', ]},	{':Category:American Films|American': [ {':Category:American Godzilla Films|Godzilla': [ 'Godzilla (1954 film)#U.S. Release|Godzilla, King of the Monsters!', 'Godzilla (1998 film)|GODZILLA (1998)', 'Godzilla (2014 film)|Godzilla (2014)', 'Godzilla: King of the Monsters', 'Godzilla vs. Kong', ]},	 {':Category:King Kong Films|King Kong': [ 'King Kong (1933 film)|King Kong (1933)', 'Son of Kong', 'King Kong (1976 film)|King Kong (1976)', 'King Kong Lives', 'King Kong (2005)|King Kong (2005)', 'Kong: Skull Island', 'Godzilla vs. Kong', ]},	 {':Category:American Films|Other': [ 'Cloverfield', 'Pacific Rim', '10 Cloverfield Lane', ':Category:American Films|more...', ]},               ':Category:American Films|more...', ]},	{':Category:Unmade Films|Unmade Films': [

{':Category:Unmade Films|Up to 1980': [ 'Bride of Godzilla|Bride of Godzilla?', 'The Volcano Monsters', 'Operation Robinson Crusoe: King Kong vs. Ebirah|King Kong vs. Ebirah', 'All Monsters Attack Directive', 'Godzilla vs. Hedorah 2', 'Godzilla vs. Redmoon', 'Godzilla vs. the Space Monsters: Earth Defense Directive', 'The Return of King Ghidorah (Showa)|The Return of King Ghidorah', 'Godzilla vs. Gigan: The Return of King Ghidorah', 'U.S.-Japan Collaboration: Godzilla', 'A Space Godzilla', 'Resurrection of Godzilla', ]},	 {':Category:Unmade Films|1981-1995': [ 'Godzilla: King of the Monsters 3-D', 'Unmade Animated Godzilla Film|Animated Godzilla film', 'Mothra vs. Bagan', 'Godzilla vs. King Kong', 'Micro Super Battle: Godzilla vs. Gigamoth', 'Godzilla vs. Mechani-Kong', 'The Return of King Ghidorah (Heisei)|The Return of King Ghidorah', 'Godzilla vs. Gigamoth', 'Godzilla vs. MechaMothra', 'Godzilla vs. Berserk', 'Godzilla vs. Mechagodzilla II (early drafts)', 'Godzilla (1994 film)|Godzilla (1994)', 'Godzilla vs. AstroGodzilla', 'Godzilla vs. Godzilla', 'Godzilla vs. Barubaroi', ]},	 {':Category:Unmade Films|1996-Present': [ 'Godzilla 2 (Unmade 1998 film sequel)|GODZILLA 2', 'Unmade King Ghidorah Film|King Ghidorah film', 'Godzilla Reborn', 'Godzilla X Varan, Baragon and Anguirus: Giant Monsters All-Out Attack|Godzilla X Varan, Baragon and Anguirus', 'Godzilla vs. Gamera (Unmade 2002 film)|Godzilla vs. Gamera', 'Godzilla 3-D', 'Godzilla (June 2012 Screenplay)|Godzilla (June 2012)', ]},

':Category:Unmade Films|more...', ]},

':Category:Films|All Films',

{':Category:Television Series|TV Series': [ //sub {'#|Godzilla TV Shows': [ 'Zone Fighter (Series)|Zone Fighter', 'Godzilla (Hanna-Barbera series)|Godzilla (Hanna-Barbera)', 'Adventure! Godzilland', 'Get Going! Godzilland', 'Godzilla Island (Series)|Godzilla Island', 'Godzilla: The Series', ]},	 {':Category:Television Series|Other': [ 'Go! Godman', 'Go! Greenman', 'Assault! Human', 'Zone Fighter (Series)|Zone Fighter', 'Super Star Fleet Sazer-X', 'Kawaii! JenNy', 'Kong: King of the Apes', ':Category:Television Series|more...', ]},         ]}, ];

/// needs to be added one day ///wgSidebar['Comics'] = [

wgSidebar['Games'] = [ {':Category:Video Games|1980s': [ 'Godzilla vs. 3 Giant Monsters', 'NEW Godzilla', 'Monster\'s Fair', 'Gojira-kun', 'The Movie Monster Game', 'Godzilla: Monster of Monsters', ':Category:Video Games|more...', ]},	{':Category:Video Games|1990s': [ 'Godzilla 2: War of the Monsters', 'Godzilla (Arcade)', 'Super Godzilla', 'Godzilla: Battle Legends', 'Godzilla: Great Monster Battle', 'Godzilla: Archipelago Shock', 'Godzilla Generations', 'Godzilla: Trading Battle', ':Category:Video Games|more...', ]},	{':Category:Video Games|2000s': [ 'Godzilla: The Series - Monster Wars', 'Godzilla: Destroy All Monsters Melee', 'Godzilla: Save the Earth', 'Godzilla: Unleashed', 'CR Godzilla 3S-T Battle', 'Godzilla: Pachislot Wars', ':Category:Video Games|more...', ]},	{':Category:Video Games|2010s': [ 'CR Godzilla: Descent of the Destruction God', 'Godzilla On Monster Island (Video Game)|Godzilla On Monster Island', 'Godzilla: Smash3', 'Godzilla (2014 video game)|Godzilla (PlayStation 3 / PlayStation 4)', 'Godzilla: Kaiju Collection', 'City Shrouded in Shadow', 'Godzilla Defense Force', ':Category:Video Games|more...', ]},	{':Category:Atari Games|Atari': [ 'Godzilla: Domination!', 'Godzilla: Destroy All Monsters Melee', 'Godzilla: Save the Earth', 'Godzilla: Unleashed', 'Godzilla Unleashed: Double Smash', ]},	{':Category:Applications|Apps': [ 'Godzilla: Monster Mayhem (Fighting Application)|Godzilla: Monster Mayhem (Fighter)', 'Godzilla: Monster Mayhem (Sidescroller Application)|Godzilla: Monster Mayhem (Sidescroller)', 'Godzilla Encounter (Application)|Godzilla Encounter', 'Godzilla: Smash3', 'Godzilla: Strike Zone', 'Godzilla: Crisis Defense', 'Godzilla: Kaiju Collection', 'Godzilla Defense Force', ]},	{':Category:Toy Lines|Toys': [ 'Godzilla Island Monster Series', 'Toho Kaiju Series', 'Movie Monster Series', 'Bandai America', 'S.H. MonsterArts', 'NECA', ':Category:Toy Lines|more...', ]}, ];

/** * MonobookSidebar: Sets sidebar submenus for elements of MonoBook, adding special * classes to pass the pointer over to allow the effect on all browsers. * * Date: 15 October 2010 * Copyright © 2010 Jesús Martínez Novo (User:Ciencia Al Poder) * * This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *   the Free Software Foundation; either version 2 of the License, or *   (at your option) any later version */ MonobookSidebar = { re_s: / /g, re_p: /%/g, loadedMenus: [], init: function { if ( !window.wgSidebar ) { return; }		for ( var menu in wgSidebar ) { var item = document.getElementById( MonobookSidebar.getId( menu ) ); if ( !item ) { continue; }			var menuId = jQuery( item ).parents.get( 2 ).id; // Check it's a valid portlet item if ( !menuId || menuId == '' ) { continue; }			// Generate menu hierarchy MonobookSidebar.buildSubmenu( item, wgSidebar[menu] ); // Set events MonobookSidebar.setEvents( menuId ); }	},	buildSubmenu: function( el, arr ) { var ul = document.createElement( 'ul' ); ul.className = 'sub-menu'; for ( var i = 0; i < arr.length; i++ ) { var li = document.createElement( 'li' ); if ( typeof arr[i] == 'string' ) { var a = MonobookSidebar.linkFromText( arr[i] ); li.appendChild( a ); } else { for ( var menukey in arr[i] ) { a = MonobookSidebar.linkFromText( menukey ); li.appendChild( a ); MonobookSidebar.buildSubmenu( li, arr[i][menukey] ); }			}			ul.appendChild( li ); }		el.appendChild( ul ); el.className = 'with-sub-menu'; var em = document.createElement( 'em' ); em.appendChild( document.createTextNode( '\u203A' ) ); el.firstChild.appendChild( em ); },	setEvents: function( menuId ) { for ( var i = 0; i < MonobookSidebar.loadedMenus; i++ ) { if ( MonobookSidebar.loadedMenus[i] == menuId ) { return; }		}		jQuery( '#' + menuId ).children.eq( 1 ).children.eq( 0 ) .bind( 'mouseover', MonobookSidebar.mouseover ) .bind( 'mouseout', MonobookSidebar.mouseout ); MonobookSidebar.loadedMenus.push( menuId ); },	mouseover: function( e ) { var target = e.target; while ( target.tagName.toLowerCase != 'div' ) { if ( target.tagName.toLowerCase == 'a' ) { target = target.parentNode; }			if ( target.tagName.toLowerCase == 'li' ) { jQuery( target ).addClass( 'hover' ); }			target = target.parentNode; }	},	mouseout: function( e ) { var target = e.target; while ( target.tagName.toLowerCase != 'div' ) { if ( target.tagName.toLowerCase == 'a' ) { target = target.parentNode; }			if ( target.tagName.toLowerCase == 'li' ) { jQuery( target ).removeClass( 'hover' ); }			target = target.parentNode; }	},	linkFromText: function( txt ) { var article = , caption = , sepPos = txt.indexOf( '|' ); if ( sepPos > 0 ) { article = txt.substr( 0, sepPos ); caption = txt.substr( sepPos + 1 ); } else { article = caption = txt; }		article = article.replace( MonobookSidebar.re_s, '_' ); // removed encodeURIComponent, it was messing things up --Jack Phoenix var a = document.createElement( 'a' ); if ( article.length > 7 && article.substr( 0, 7 ) == 'http://' ) { a.setAttribute( 'href', article ); } else { article = article.replace( MonobookSidebar.re_s, '_' ); // removed encodeURIComponent, it was messing things up --Jack Phoenix // Replace encoded colons with normal colons -- added this. --Jack Phoenix article = article.replace( '%3A', ':' ); // added code ends here a.setAttribute( 'href', mw.config.get('wgArticlePath').replace( '$1', article ) ); }		a.appendChild( document.createTextNode( caption ) ); return a;	}, getId: function( name ) { return 'n-' + encodeURIComponent( name.replace( MonobookSidebar.re_s, '-' ) ).replace( MonobookSidebar.re_p, '.' ); } };

/* Calling this code to initialize */ $( MonobookSidebar.init );