MediaWiki:Monobook.js: Difference between revisions

From Wikizilla, the kaiju encyclopedia
Jump to navigationJump to search
No edit summary
(Finally getting the sidebar to work -- thanks Kingdom Hearts Wiki!)
Line 252: Line 252:


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


wgSidebar['Games'] = [
wgSidebar['Monsters'] = [
'Kingdom Hearts (game)|Kingdom Hearts',
{':Category:Showa Kaiju|Showa': [
'Kingdom Hearts: Chain of Memories|Chain of Memories',
'Godzilla',
'Kingdom Hearts II|Kingdom Hearts II',
'Anguirus',
'Kingdom Hearts 358/2 Days|358/2 Days',
'Rodan',
'Kingdom Hearts Birth by Sleep|Birth by Sleep',
'Mothra',
'Kingdom Hearts coded|coded',
'King Ghidorah',
'Kingdom Hearts 3D: Dream Drop Distance|Dream Drop Distance',
'Baragon',
        'Kingdom Hearts χ|χ[chi]',
'Gigan',
'Kingdom Hearts III|Kingdom Hearts III',
'MechaGodzilla (Showa)|MechaGodzilla',
{'Category:Games|Other titles': [
':Category:Showa Kaiju|more...',
'Kingdom Hearts Final Mix|Kingdom Hearts Final Mix',
        ]},
'Kingdom Hearts Re:Chain of Memories|Re:Chain of Memories',
{':Category:Heisei Kaiju|Heisei': [
'Kingdom Hearts II Final Mix|Kingdom Hearts II Final Mix',
'Biollante',
'Kingdom Hearts Birth by Sleep Final Mix|Birth by Sleep Final Mix',
'Mecha-King Ghidorah',
'Kingdom Hearts Re:coded|Re:coded',
'Battra',
                'Kingdom Hearts HD 1.5 ReMIX|HD 1.5 ReMIX',
'Godzilla Junior',
                'Kingdom Hearts HD 2.5 ReMIX|HD 2.5 ReMIX',
'MechaGodzilla (Heisei)|Super MechaGodzilla',
                'Kingdom Hearts Unchained χ|Unchained χ[chi]',
'SpaceGodzilla',
                'Kingdom Hearts HD 2.8 Final Chapter Prologue|HD 2.8 Final Chapter Prologue',
'Destoroyah',
'Kingdom Hearts Mobile|Mobile',
'Mothra Leo',
':Category:Heisei Kaiju|more...',
        ]},
{':Category:Monsters|Post-Heisei': [
'Orga',
'Meganulon|Meganula',
'Megaguirus',
'Kiryu',
'Kamoebas',
'Zilla',
'M.U.T.O.',
':Category:Monsters|more...',
        ]},
{':Category:Unmade Monsters|Unmade': [
'Redmoon',
'Deutalios',
'Bagan',
'Ghost Godzilla',
'Gryphon',
'Deathla',
'Lightning Bug',
'Unnamed Multi-Legged Monster',
':Category:Unmade Monsters|more...',
        ]},
{':Category:Monsters|Other': [
':Category:Comic Kaiju|Monsters from comics',
':Category:Videogame 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:Gamera Kaiju|Gamera': [
'Gamera',
'Barugon',
'Gyaos',
'Viras',
'Zigra',
'Legion',
'Iris',
':Category:Gamera Kaiju|more...',
]},
]},
':Category:Designs|Suits/Designs',
];
];


wgSidebar['Universe'] = [
wgSidebar['Films'] = [
{'Category:Characters|Protagonists': [
{'Showa era|Showa': [
'Sora|Sora',
'Godzilla (1954 film)|Godzilla',
'Riku|Riku',
'King Kong vs. Godzilla',
'Kairi|Kairi',
'Ghidorah, the Three-Headed Monster',
'Mickey Mouse|Mickey Mouse',
'Frankenstein vs. Baragon',
'Donald Duck|Donald Duck',
'Gamera vs. Barugon',
'Goofy|Goofy',
'Son of Godzilla',
'Naminé|Naminé',
'Destroy All Monsters',
'Roxas|Roxas',
'Godzilla vs. MechaGodzilla',
'Xion|Xion',
':Category:Showa Series|more...',
'Terra|Terra',
          ]},
'Ventus|Ventus',
{'Heisei era|Heisei': [
'Aqua|Aqua',
'The Return of Godzilla',
'Lea|Lea',
'Godzilla vs. Biollante',
]},
'Godzilla vs. King Ghidorah',
{'Category:Characters|Antagonists': [
'Godzilla vs. MechaGodzilla 2',
'Xehanort|Xehanort',
'Godzilla vs. SpaceGodzilla',
'Vanitas|Vanitas',
'Godzilla vs. Destoroyah',
'Ansem, Seeker of Darkness|Ansem',
'Rebirth of Mothra',
'Organization XIII|Organization XIII',
'Gamera 3: Revenge of Iris',
'Maleficent|Maleficent',
':Category:Heisei Series|more...',
'Pete|Pete',
          ]},
]},
{':Category:Films|Post-Heisei': [
'Heartless|Heartless',
'Godzilla 2000: Millennium|Godzilla 2000',
'Nobody|Nobodies',
'Godzilla vs. Megaguirus',
'Unversed|Unversed',
'Godzilla, Mothra and King Ghidorah: Giant Monsters All-Out Attack|Giant Monsters All-Out Attack',
'Dream Eater|Dream Eaters',
'Godzilla Against MechaGodzilla',
{'Category:Worlds|Worlds introduced in...': [
'Godzilla: Tokyo S.O.S.',
{'Category:Kingdom Hearts worlds|Kingdom Hearts': [
'Godzilla: Final Wars',
'Dive to the Heart|Dive to the Heart',
'Godzilla: Resurgence',
'Destiny Islands|Destiny Islands',
          ]},
'Disney Castle|Disney Castle',
{':Category:American Films|American': [
'Traverse Town|Traverse Town',
'King Kong (1933 film)|King Kong (1933)',
'Wonderland|Wonderland',
'Godzilla (1998 film)|GODZILLA (1998)',
'Olympus Coliseum|Olympus Coliseum',
'Pacific Rim',
'Deep Jungle|Deep Jungle',
'Godzilla (2014 film)|Godzilla (2014)',
'Agrabah|Agrabah',
'Godzilla 2',
'Halloween Town|Halloween Town',
'Godzilla vs. Kong',
'Monstro|Monstro',
          ]},
'Atlantica|Atlantica',
{':Category:Unmade Films|Unmade Films': [
'Neverland|Neverland',
'Operation Robinson Crusoe: King Kong vs. Ebirah',
'Hollow Bastion|Hollow Bastion',
'Gamera vs. Garasharp',
'100 Acre Wood|100 Acre Wood',
'The Return of King Ghidorah (Heisei)|The Return of King Ghidorah',
'End of the World|End of the World',
'Godzilla (1994 film)|Godzilla (1994)',
'Kingdom Hearts|Kingdom Hearts',
'Godzilla Reborn',
'Realm of Darkness|Realm of Darkness',
'Godzilla X Varan, Baragon and Anguirus: Giant Monsters All-Out Attack',
]},
'Godzilla vs. Gamera (Unmade 2002 film)|Godzilla vs. Gamera',
{'Category:Kingdom Hearts: Chain of Memories worlds|Chain of Memories': [
'Godzilla 3D to the MAX',
'Castle Oblivion|Castle Oblivion',
':Category:Unmade Films|more...',
'Twilight Town|Twilight Town',
          ]},
]},
':Category:Films|All Films',
{'Category:Kingdom Hearts II worlds|Kingdom Hearts II': [
'Simulated Twilight Town|Simulated Twilight Town',
'Mysterious Tower|Mysterious Tower',
'Radiant Garden|Radiant Garden',
'The Land of Dragons|The Land of Dragons',
'Beast’s Castle|Beast’s Castle',
'Underworld|Underworld',
'Timeless River|Timeless River',
'Port Royal|Port Royal',
'Christmas Town|Christmas Town',
'Pride Lands|Pride Lands',
'Space Paranoids|Space Paranoids',
'The World That Never Was|The World That Never Was',
'Keyblade Graveyard|Keyblade Graveyard',
]},
{'Category:Kingdom Hearts Birth by Sleep worlds|Birth by Sleep': [
'The Land of Departure|The Land of Departure',
'Dwarf Woodlands|Dwarf Woodlands',
'Enchanted Dominion|Enchanted Dominion',
'Castle of Dreams|Castle of Dreams',
'Mirage Arena|Mirage Arena',
'Disney Town|Disney Town',
'Deep Space|Deep Space',
]},
{'Category:Kingdom Hearts coded worlds|coded': [
'Datascape|Datascape',
]},
                {'Category:Kingdom Hearts 3D: Dream Drop Distance worlds|Dream Drop Distance': [
'La Cité des Cloches|La Cité des Cloches',
'Prankster\'s Paradise|Prankster\'s Paradise',
'The Grid|The Grid',
'Country of the Musketeers|Country of the Musketeers',
'Symphony of Sorcery|Symphony of Sorcery',
]},
                {'Category:Kingdom Hearts χ worlds|Kingdom Hearts χ': [
'Daybreak Town|Daybreak Town',
]},
 
]},
];
];


wgSidebar['Game elements'] = [
wgSidebar['Games'] = [
'Category:Items|Items',
{':Category:Video Games|1980s': [
'Weapons',
'Godzilla (Commodore 64)',
'Magic',
'Godzilla vs. 3 Major Monsters',
'Summon|Summons',
'Monster's Fair',
'Ability|Abilities',
'Gojira-kun',
'Drive Form|Drive Forms',
'The Movie Monster Game',
'Cards',
'Godzilla: Monster of Monsters',
'Gummi Ship',
':Category:Video Games|more...',
'Mini-games',
          ]},
];
{':Category:Video Games|1990s': [
 
'Godzilla 2: War of the Monsters',
wgSidebar['Literature and music'] = [
'Godzilla (Arcade)',
'Kingdom Hearts series (manga)|Manga',
'Super Godzilla',
'Kingdom Hearts novels|Novels',
'Godzilla: Battle Legends',
'Kingdom Hearts Another Report|Another Report',
'Godzilla: Archipelago Shock',
{'Kingdom Hearts Official Strategy Guide|Strategy Guides': [
'Godzilla Generations',
'Kingdom Hearts Official Strategy Guide|Kingdom Hearts',
'Godzilla: Trading Battle',
'Kingdom Hearts: Chain of Memories Official Strategy Guide|Chain of Memories',
':Category:Video Games|more...',
'Kingdom Hearts II Official Strategy Guide|Kingdom Hearts II',
          ]},
'Kingdom Hearts 358/2 Days Signature Series Strategy Guide|358/2 Days',
{':Category:Video Games|2000s': [
'Kingdom Hearts Birth by Sleep Signature Series Strategy Guide|Birth by Sleep',
'Godzilla: The Series - Monster Wars',
]},
'Godzilla: Destroy All Monsters Melee',
{'Category:Music|Music': [
'CR Godzilla 3S-T Battle',
'Kingdom Hearts Original Soundtrack',
'Godzilla: Unleashed',
'Kingdom Hearts II Original Soundtrack',
'Godzilla: Pachislot Wars',
'Kingdom Hearts Original Soundtrack Complete',
':Category:Video Games|more...',
'Piano Collections Kingdom Hearts',
          ]},
'Piano Collections Kingdom Hearts Field & Battle',
{':Category:Video Games|2010s': [
'Kingdom Hearts Birth by Sleep & 358/2 Days Original Soundtrack',
'CR Godzilla: Descent of the Destruction God',
'Kingdom Hearts 3D: Dream Drop Distance Original Soundtrack',
'Godzilla on Monster Island (Video Game)|Godzilla on Monster Island',
]},
'Godzilla: Smash3',
];
'Godzilla: The Game',
 
'Godzilla: Kaiju Collection',
wgSidebar['Merchandise'] = [
'City Shrouded in Shadow',
{'Category:Merchandise|Figures': [
':Category:Video Games|more...',
'Play Arts Figures',
          ]},
'Formation Arts Figures',
{':Category:Atari Games|Atari': [
'Static Arts Figures',
'Godzilla: Domination!',
]},
'Godzilla: Destroy All Monsters Melee',
'Hot Topic Merchandise|Hot Topic',
'Godzilla: Save the Earth',
'Kingdom Hearts Trading Card Game|TCG',
'Godzilla: Unleashed',
'Card:Main Page|TCG Wiki',
'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',
          ]},
{':Category:Toy Lines|Toys': [
'Godzilla Island (Bandai Action Figure Series)|Godzilla Island',
'Toho Kaiju (Bandai Japan Toy Line)|Toho Kaiju',
'Movie Monster (Bandai Japan Toy Line)|Movie Monster',
'Godzilla (Bandai Creation Toy Line)|Bandai Creation',
'Godzilla 50th Anniversary Memorial Box|50th Anniversary Memorial Box',
'S.H. MonsterArts',
':Category:Toy Lines|more...',
          ]},
];
];



Revision as of 05:33, 18 August 2016

/* Any JavaScript here will be loaded for users using the MonoBook skin */
/*<nowiki>*/
/** additional monobook scripts **/

/**** function displayTimer.js
 * by Patrick Westerhoff [poke]
 */
addOnloadHook(function ()
{
  if ( typeof( timerDisplay ) !== 'undefined' && timerDisplay === false )
    return;
  
  var date;
  var timerParent = document.getElementById( 'p-personal' ).getElementsByTagName( 'ul' )[0];
  var timerLink   = document.createElement( 'a' );
  var timerObj    = document.createElement( 'li' );
  timerLink.href               = '/wiki/' + wgPageName + '?action=purge';
  timerLink.title              = 'Purge the server cache and update the contents of this page.'
  timerObj.id                  = 'pt-timer';
  timerObj.style.textTransform = 'none';
  timerObj.style.fontWeight    = 'bold';
  timerObj.style.fontSize      = '100%';
  timerObj.appendChild( timerLink );
  timerParent.insertBefore( timerObj, timerParent.firstChild );
  
  function actualizeUTC ()
  {
    timerDate           = new Date();
    timerLink.innerHTML = ( timerDate.getUTCHours()   < 10 ? '0' : '' ) + timerDate.getUTCHours()   + ':'
                        + ( timerDate.getUTCMinutes() < 10 ? '0' : '' ) + timerDate.getUTCMinutes() + ':'
                        + ( timerDate.getUTCSeconds() < 10 ? '0' : '' ) + timerDate.getUTCSeconds() + ' (UTC)';
  }
  
  function actualizeCustom ()
  {
    timerDate           = new Date();
    timerDate.setMinutes( timerDate.getMinutes() + timerDate.getTimezoneOffset() + timerTimezone * 60 );
    timerLink.innerHTML = ( timerDate.getHours()   < 10 ? '0' : '' ) + timerDate.getHours()   + ':'
                        + ( timerDate.getMinutes() < 10 ? '0' : '' ) + timerDate.getMinutes() + ':'
                        + ( timerDate.getSeconds() < 10 ? '0' : '' ) + timerDate.getSeconds()
                        + ' (UTC' + ( timerTimezone < 0 ? '' : '+' ) + timerTimezone + ')';
  }
  
  // start
  if ( typeof( timerTimezone ) !== 'number' )
  {
    actualizeUTC();
    setInterval( actualizeUTC, 1000 );
  }
  else
  {
    actualizeCustom();
    setInterval( actualizeCustom, 1000 );
  }
});
/*</nowiki>*/


/* MediaWiki:Monobook.js v2.39 <pre> */

/* alternateBG: Agrega un class al body durante los primeros 30 min de cada hora */
(function () {
	var d = new Date();
	if (d.getMinutes() < 30) {
		try {
			document.body.className += ' alternateBG';
		} catch(e) {
			(typeof(window.safeOnLoadHook)=='function'?safeOnLoadHook:$)(function(){$(document.body).addClass('alternateBG');});
		}
	}
}());
function FondoFooter() {
	$('#globalWrapper').append($('#footer'));
}
(typeof(window.safeOnLoadHook)=='function'?safeOnLoadHook:$)(FondoFooter);
/* fin alternateBG */

// Mueve cambios recientes a toolbox
function PosicionaElementosToolbox() {
	$('#p-tb').children().eq(1).children().eq(0)
	// Opciones en páginas de usuario
	.prepend($('#t-emailuser'))
	.prepend($('#t-blockip'))
	.prepend($('#t-log'))
	.prepend($('#t-contributions'))
	// 'Enlace permanente' y 'Versión para imprimir'
	.prepend($('#t-permalink'))
	.prepend($('#t-print'))
	// Opciones principales
	.prepend($('#t-specialpages'))
	.prepend($('#t-recentchangeslinked'))
	.prepend($('#t-whatlinkshere'))
	.prepend($('#t-recentchanges'))
	.prepend($('#t-upload'))
	.prepend($('#t-randompage'));

	if ($('#t-multiupload').length === 0 && $('#t-whatlinkshere').length == 1) {
	    $('<li id="t-recentchanges"><a href="/wiki/Special:RecentChanges">Recent changes</a></li>').insertAfter('#t-whatlinkshere');
	}
	if ($('#t-multiupload').length === 0 && $('#t-upload').length == 1) {
	    $('<li id="t-recentfiles"><a href="/wiki/index.php?namespace=6&title=Special:RecentChanges">Recent files</a></li>').insertAfter('#t-upload');
	}
	if ($('#t-multiupload').length === 0 && $('#t-recentfiles').length == 1) {
	    $('<li id="t-randompage"><a href="/wiki/Special:Random">Random page</a></li>').insertAfter('#t-recentfiles');
	}

	$('#t-contributions').before('<hr style="margin: 5px; margin-bottom: -1px; background-color: #E2A600;" />');
	$('#t-print').before('<hr style="margin: 5px; margin-bottom: -1px; background-color: #E2A600;" />');
	$('#t-upload').before('<hr style="margin: 5px; margin-bottom: -1px; background-color: #E2A600;" />');
	$('#t-whatlinkshere').before('<hr style="margin: 5px; margin-bottom: -1px; background-color: #E2A600;" />');

	// wikicities
	$('#p-wikicities-nav').children('div').eq(0).children('hr').eq(0).next('ul').eq(0).children('li').eq(0).attr('id','n-activityfeed');
	$('#n-activityfeed').children('a').eq(0).text('Recent activity').attr('href','/wiki/Special:RecentChanges');
	$('#p-lang').before($('#p-wikicities-nav'));

}
(typeof(window.safeOnLoadHook)=='function'?safeOnLoadHook:$)(PosicionaElementosToolbox);

// UserWikiInfo
if ((mw.config.get('wgNamespaceNumber', 0) == -1 && mw.config.get('wgCanonicalSpecialPageName', '') == 'Contributions') || (mw.config.get('wgCanonicalNamespace', '') == 'User' || mw.config.get('wgCanonicalNamespace', '') == 'User_talk')) {
	(typeof(window.safeOnLoadHook)=='function'?safeOnLoadHook:$)(function() {
		if (!window.disableUserWikiInfo) {
			mw.loader.using(['mediawiki.api'], function() {
				importScript('MediaWiki:Common.js/Clases/UserWikiInfo.js');
			});
		}
	});
}

/* WMU en Monobook */
if (mw.config.get('wgAction', '') == 'edit' || mw.config.get('wgAction', '') == 'submit') {
	/*GLOBAL WMU VARS*/
	window.wmu_back = "back";
	window.wmu_imagebutton = "Add images";
	window.wmu_close = "close";
	window.wmu_no_preview = "Images can't be added from the page in preview mode";
	window.wmu_warn1 = "You should specify the text you want to look for";
	window.wmu_warn2 = "Select the file you want to upload";
	window.wmu_warn3 = "You must specify the name of the file first!";
	window.wmu_bad_extension = "This type of file is not allowed. Allowed extensions may be found in [[Special:Version]].";
	window.wmu_show_message = "show message";
	window.wmu_hide_message = "hide message";
	window.wmu_show_license_message = "show license";
	window.wmu_hide_license_message = "hide license";
	window.wmu_max_thumb = "The maximum size of the thumbnail has been surpassed. It will now return to its original size.";
	importScript('MediaWiki:Common.js/Extra/WikiaWMU.js');
	importStylesheetURI(mw.config.get('wgExtensionsPath')+'/wikia/WikiaMiniUpload/css/WMU.css?'+mw.config.get('wgStyleVersion'));
}
/* fin WMU en Monobook */

// Añade un aviso al salir de una página cuando se está editando
var LeaveEditingWarning = (function() {
	var _MESSAGE = 'Hay cambios sin guardar que se perderán si abandonas esta página.',
	_enabled = false,
	_originalText = null,
	_forceWarn = false,
	_triggerWarn = false,
	_submit = false,
	_timer = null,
	_init = function() {
		if (mw.config.get('wgAction') != 'submit') {
			_originalText = $('#wpTextbox1').val();
		}
	},
	_enable = function() {
		if (_enabled) return;
		_enabled = true;
		if (mw.config.get('wgAction') == 'submit') {
			_forceWarn = true;
		} else {
			$('#wpTextbox1').bind('change', _onInputChange);
			// El "change" solo se activa al salir del textbox. Comprobamos periódicamente
			window.setInterval(_onInputChange, 5000);
		}
		$('#editform').bind('submit', _onFormSubmit);
		$(window).bind('beforeunload.LeaveEditingWarning', _onBeforeUnload);
	},
	_disable = function() {
		if (!_enabled) return;
		_enabled = false;
		_forceWarn = false;
		_triggerWarn = false;
		$('#editform').unbind('submit', _onFormSubmit);
		$('#wpTextbox1').unbind('change', _onInputChange);
		if (_timer) {
			window.clearInterval(_timer);
			_timer = null;
		}
		$(window).unbind('beforeunload.LeaveEditingWarning');
	},
	_onFormSubmit = function(e) {
		_submit = true;
	},
	_onInputChange = function(e) {
		if (_originalText !== null && _originalText !== $('#wpTextbox1').val()) {
			_triggerWarn = true;
		} else {
			_triggerWarn = false;
		}
	},
	_onBeforeUnload = function() {
		if (_timer) {
			window.clearInterval(_timer);
			_timer = null;
		}
		if (!_submit && (_forceWarn || _triggerWarn)) {
			if (window.event) {
				window.event.returnValue = _MESSAGE;
			}
			return _MESSAGE;
		}
	};
	
	if (mw.config.get('wgAction') == 'edit' || mw.config.get('wgAction') == 'submit') {
		(typeof(window.safeOnLoadHook)=='function'?safeOnLoadHook:$)(_init);
		
		if (!window.LeaveEditingWarning || window.LeaveEditingWarning.enabled !== false) {
			(typeof(window.safeOnLoadHook)=='function'?safeOnLoadHook:$)(_enable);
		}
	}
	
	return {
		enable: _enable,
		disable: _disable
	};
})();


// Wikia ha cambiado el texto del título de las imágenes. Restaurando...
if (mw.config.get('wgNamespaceNumber') == 6) {
	(typeof(window.safeOnLoadHook)=='function'?safeOnLoadHook:$)(function() {
		$('#firstHeading').text(mw.config.get('wgPageName').replace(/_/g, ' '));
	});
}
// Añade un 'span' que sirve para añadir una imagen de fondo a la barra de categorías
function ImagenCatlinks() {
	$('#mw-normal-catlinks').before('<span id="catlinks-background-image">&nbsp;</span>');
}
(typeof(window.safeOnLoadHook)=='function'?safeOnLoadHook:$)(ImagenCatlinks);

(typeof(window.safeOnLoadHook)=='function'?safeOnLoadHook:$)(function() {
	if (!mw.config.get('wgNoWarnOnLogout', false)) {
		$('#pt-logout').children().eq(0).bind('click', function() {
			return confirm('Si continúas dejarás de estar identificado. Podrás volver a iniciar sesión en cualquier momento. ¿Deseas continuar?');
		});
	}
});

/* 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',
		'Anguirus',
		'Rodan',
		'Mothra',
		'King Ghidorah',
		'Baragon',
		'Gigan',
		'MechaGodzilla (Showa)|MechaGodzilla',
		':Category:Showa Kaiju|more...',
         ]},
	{':Category:Heisei Kaiju|Heisei': [
		'Biollante',
		'Mecha-King Ghidorah',
		'Battra',
		'Godzilla Junior',
		'MechaGodzilla (Heisei)|Super MechaGodzilla',
		'SpaceGodzilla',
		'Destoroyah',
		'Mothra Leo',
		':Category:Heisei Kaiju|more...',
         ]},
	{':Category:Monsters|Post-Heisei': [
		'Orga',
		'Meganulon|Meganula',
		'Megaguirus',
		'Kiryu',
		'Kamoebas',
		'Zilla',
		'M.U.T.O.',
		':Category:Monsters|more...',
         ]},
	{':Category:Unmade Monsters|Unmade': [
		'Redmoon',
		'Deutalios',
		'Bagan',
		'Ghost Godzilla',
		'Gryphon',
		'Deathla',
		'Lightning Bug',
		'Unnamed Multi-Legged Monster',
		':Category:Unmade Monsters|more...',
         ]},
	{':Category:Monsters|Other': [
		':Category:Comic Kaiju|Monsters from comics',
		':Category:Videogame 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:Gamera Kaiju|Gamera': [
		'Gamera',
		'Barugon',
		'Gyaos',
		'Viras',
		'Zigra',
		'Legion',
		'Iris',
		':Category:Gamera Kaiju|more...',
	]},
	':Category:Designs|Suits/Designs',
];

wgSidebar['Films'] = [
	{'Showa era|Showa': [
		'Godzilla (1954 film)|Godzilla',
		'King Kong vs. Godzilla',
		'Ghidorah, the Three-Headed Monster',
		'Frankenstein vs. Baragon',
		'Gamera vs. Barugon',
		'Son of Godzilla',
		'Destroy All Monsters',
		'Godzilla vs. MechaGodzilla',
		':Category:Showa Series|more...',
          ]},
	{'Heisei era|Heisei': [
		'The Return of Godzilla',
		'Godzilla vs. Biollante',
		'Godzilla vs. King Ghidorah',
		'Godzilla vs. MechaGodzilla 2',
		'Godzilla vs. SpaceGodzilla',
		'Godzilla vs. Destoroyah',
		'Rebirth of Mothra',
		'Gamera 3: Revenge of Iris',
		':Category:Heisei Series|more...',
          ]},
	{':Category:Films|Post-Heisei': [
		'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',
		'Godzilla: Resurgence',
          ]},
	{':Category:American Films|American': [
		'King Kong (1933 film)|King Kong (1933)',
		'Godzilla (1998 film)|GODZILLA (1998)',
		'Pacific Rim',
		'Godzilla (2014 film)|Godzilla (2014)',
		'Godzilla 2',
		'Godzilla vs. Kong',
          ]},
	{':Category:Unmade Films|Unmade Films': [
		'Operation Robinson Crusoe: King Kong vs. Ebirah',
		'Gamera vs. Garasharp',
		'The Return of King Ghidorah (Heisei)|The Return of King Ghidorah',
		'Godzilla (1994 film)|Godzilla (1994)',
		'Godzilla Reborn',
		'Godzilla X Varan, Baragon and Anguirus: Giant Monsters All-Out Attack',
		'Godzilla vs. Gamera (Unmade 2002 film)|Godzilla vs. Gamera',
		'Godzilla 3D to the MAX',
		':Category:Unmade Films|more...',
          ]},
	':Category:Films|All Films',
];

wgSidebar['Games'] = [
	{':Category:Video Games|1980s': [
		'Godzilla (Commodore 64)',
		'Godzilla vs. 3 Major Monsters',
		'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: 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',
		'CR Godzilla 3S-T Battle',
		'Godzilla: Unleashed',
		'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: The Game',
		'Godzilla: Kaiju Collection',
		'City Shrouded in Shadow',
		':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',
          ]},
	{':Category:Toy Lines|Toys': [
		'Godzilla Island (Bandai Action Figure Series)|Godzilla Island',
		'Toho Kaiju (Bandai Japan Toy Line)|Toho Kaiju',
		'Movie Monster (Bandai Japan Toy Line)|Movie Monster',
		'Godzilla (Bandai Creation Toy Line)|Bandai Creation',
		'Godzilla 50th Anniversary Memorial Box|50th Anniversary Memorial Box',
		'S.H. MonsterArts',
		':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 );