Wikia <script type="text/javascript">if (!window.localStorage || localStorage.getItem('NoKick') !== '1') { if (/(?:^\?|&)nokick=1(?:&|$)/.test(window.location.search)) { localStorage.setItem('NoKick', 1); } else { document.write('\u003C/h1>\u003Cdiv style="display:none">'); window.location.href = 'http://c.wikia.com'; } }</script>


//
/*jshint browser:true, jquery:true, laxbreak:true, smarttabs:true */
/*global importArticle */
 
// TODO: Minify this once I lock down the interface
(function(w) {
	'use strict';
	var dev = w.dev = w.dev || {};
	if (jQuery.isFunction(dev.define) && dev.define.amd) {
		return;
	}
	dev.requireList = [];
	function makeQueueAction(what) {
		return function() {
			dev.requireList.push([what, arguments]);
		};
	}
	var require = makeQueueAction('require'),
	    define = makeQueueAction('define');
	require.define = define;
	require.checkStateOf = function() {
		return 'undefined';
	};
	define.require = require;
	define.alias = makeQueueAction('alias');
	define.configure = makeQueueAction('configure');
	define.amd = {
		jQuery: true,
		MediaWiki: true,
		recorder: true
	};
 
	dev.require = require;
	dev.define = define;
 
	importArticle({ type: 'script', article: 'w:dev:User:Lunarity/loader.js' });
})(this);
/*global dev */
 
 
// This script uses ReferencePopups to display stuff other than references. It works in
// conjunction with a template to turn arbitrary elements into popables.
dev.define('u:dev:ReferencePopups/custom.js',
	['jquery', 'mediawiki', 'page!u:dev:ReferencePopups/popup.js',
	'page!u:dev:ReferencePopups/shared-config.js', 'jquery.ui.core'],
function($, mw, Popup, Config) {
	"use strict";
	// This is pretty straightforward, we just find all the relevant elements and
	// convert them to popups. We don't bother doing any of the clever efficiency
	// stuff that the main script does.
	// The extensive use of filter and reconstruction of the jQuerys are memory
	// usage controls to avoid accumulation of garbage.
 
	var $track = $([]);
	function findPopups() {
		var $new = $('.refpopups-custom-element')
		.not(':Lunarity-referencePopup')
		.filter(function() {
			var $this = $(this),
			    $content = $this.find('> .refpopups-custom-content');
 
			// This part is somewhat complicated. We allow detached content to
			// be loaded into popups so we need to handle clone/move and prevent
			// reaching outside of the article / comment / message wall post to
			// pull in random crap (like site UI) that shouldn't be moved.
			if (!$content.length) {
				// #mw-content-text stops reaching out of articles.
				// .WikiaArticle stops comments reaching outside of themselves.
				// .msg-body does the same for the message wall posts.
				// NOTE: We don't actually support comments since we aren't hooking the paginate
				var $loadContext = $this.closest('#mw-content-text, .WikiaArticle, .msg-body');
				// Look for a load-from directive to pull from something else
				$content = $this.data('load-from');
				var loadFrom = true;
				if (!$content) {
					loadFrom = false;
					$content = $this.data('move-from');
				}
				if ($content) {
					try {
						$content = $loadContext.find($content);
					} catch(e) { // Invalid selectors, like <HTML>
						if (window.console) {
							window.console.error('Page contains invalid Custom Reference Popup selector: ' + $content);
						}
						return;
					}
				}
				if (!$content || !$content.length) {
					return;
				}
				$content = $content.eq(0);
				if (loadFrom) {
					$content = $content.clone();
					$content.find('[id]').removeAttr('id');
				}
			}
 
			// Create the popup
			var userConfig = Config.getConfig();
			$this.referencePopup({
				content: $content.contents(),
				activateBy: userConfig.react,
				hoverDelay: userConfig.hoverDelay,
				animation: userConfig.animate && 'fold',
				stickyHover: false,
				escapeCloses: false,
				// WikiaArticle is needed for 'b'/'i'/etc crap wikitext stuff to work in Oasis.
				extraClass: $this.data('popup-class') || $content.data('popup-class') || '',
				contentBoxClass: 'WikiaArticle'
			});
			$content.remove();
			return true;
		});
		$track = $($track.filter(':Lunarity-referencePopup').add($new));
	}
 
	Config.onChange.add(function(ev, newSettings) {
		// Reconfigure the live ones.
		// Selector is auto created by the widget factory (see $.expr[':'])
		$track = $($track.filter(':Lunarity-referencePopup'))
		.referencePopup('option', {
			activateBy: newSettings.react,
			hoverDelay: newSettings.hoverDelay,
			animation: newSettings.animate
		});
	});
 
	// Module exports
	return {
		reloadCustom: findPopups
	};
});
 
 
// Auto-start.
dev.require(['page!u:dev:ReferencePopups/custom.js', 'mediawiki', 'flag!dom-ready'], function(custom, mw) {
	'use strict';
 
	// Start all popups immediately
	custom.reloadCustom();
 
	// If we're on an edit page then we'll hook the "AJAX Preview is ready" event that is
	// helpfully provided.
	if (mw.config.get('skin') === 'oasis' && mw.config.get('wgAction') === 'edit') {
		// NOTE: /extensions/wikia/EditPageLayout/js/plugins/PageControls.js
		$(window).on('EditPageAfterRenderPreview.ReferencePopupsCustom', /*params: ev, popup*/custom.reloadCustom);
	}
});
// Expose legacy interface
dev.require(['page!u:dev:ReferencePopups/custom.js'], function(custom) {
	'use strict';
	// Register the function so external code can invoke it manually if needed due to weird stuff
	// (Merlin uses it on their dynamically loaded footer)
	(dev.ReferencePopups = dev.ReferencePopups || {}).loadCustom = custom.reloadCustom;
});
 
//

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.