User:DEmersonJMFM/global.js

// ******************************************************************** // AutoEditDropdown config - http://dev.wikia.com/wiki/AutoEditDropdown // ******************************************************************** window.AutoEditDropdownConfig = { expandedAreaContribute: true, expandedAreaEdit: false };

// ************************************************************** // Oasis Improvements - http://dev.wikia.com/wiki/AdvancedOasisUI // **************************************************************

window.AdvancedOasisUI = { accountNavFollowedPages: true, accountNavWatchlist: false, categoryRedlink: true, RCHeader: false, DefaultSourceMode: true, lightbox: false, // gallery link bug with w:c:dev:NoImageLightbox randomPageLimitedTo: '', activity2RC: false, userLang: true, };

// **************************************************************** // Display clock settings - http://dev.wikia.com/wiki/DisplayClock // **************************************************************** window.DisplayClockJS = { format: "%2H:%2M:%2S %p %2d %B %Y (UTC)", location: "header" };

// ***************************** // Beginning of Script importing // ***************************** importArticles({   type: "script",    articles: [        'w:c:dev:DisplayClock/code.js',                    // Wikia Clock (UTC)        'w:c:dev:WHAM/code.js',                            // Quick Tools        'w:c:dev:ListFiles/code.js',                       // File Management        'w:c:dev:AjaxBatchDelete/code.js',                 // Batch Delete        'w:c:dev:AdvancedOasisUI/code.js',                 // Oasis Improvements        'w:c:dev:AutoEditDropdown/code.js',                // Automatic Drop of edit menu        'w:c:dev:BackToTopButton/code.js',                 // Back-to-the-top Button        'w:c:dev:Thread Inspection/code.js',               // View Deleted Thread Posts        'w:c:alvin:MediaWiki:Common.js/activityrefresh.js' // Ajax Refresh Feeds    ] });

// ******************************************************************************** // NoImageLightbox http://dev.wikia.com/wiki/NoImageLightbox/code.js (Not Original) // ******************************************************************************** /*jshint forin:true, noempty:true, eqeqeq:true, bitwise:true, strict:true, undef:true, unused:true, curly:true, browser:true, jquery:true */ /*global mediaWiki */ if ({ 'oasis': 1, 'wikia': 1 }[mediaWiki.config.get('skin')] === 1) { (function ($, mw, window) {		"use strict";		// [private] variables		var $images, NoImageLightbox;		// fix hrefs to go to the File: page		// Note: doesn't affect videos, video hrefs are already correct, don't need updated		function updateImgLinkHrefs {			$images.each(function { // Note: a.image, a.lightbox excludes image previews on File: pages themselves, // which are of course intended to link to the direct URL of the image var $img = $(this), urlpart = $img.attr('data-image-key'), // already url encoded $a = $img.parent('a.image, a.lightbox'); $a.attr('href', $a.attr('href')); });		}		// DEFAULT: turn off the lightbox for IMAGES ONLY		function killLightboxForImagesOnly {			// runs before Wikia's LightboxLoader.loadLightbox event			// and prevents it from executing by stopping propagation on images			$images			.off('click.noimagelightbox')			.on('click.noimagelightbox', function (event) { event.stopImmediatePropagation; });		}		// init		function initNoImageLightbox {			//console.log('***** NOIMAGELIGHTBOX SCRIPT - init');			$images = $('img[data-image-key]');			NoImageLightbox = window.NoImageLightbox || {};			updateImgLinkHrefs;			if (NoImageLightbox.novideo) {				killLightboxEntirely;			} else {				killLightboxForImagesOnly;			}		}		// automatically add init to the ajaxCallAgain array for compatibility with AjaxRC		// e.g. when images show up in the activity feed on Special:WikiActivity		if ($.isArray(window.ajaxCallAgain)) {			window.ajaxCallAgain[window.ajaxCallAgain.length] = initNoImageLightbox;		} else {			window.ajaxCallAgain = [initNoImageLightbox];		}		// call init on $(document).ready and when Right Rail loads		$(initNoImageLightbox);		$('#WikiaRail').on('DOMNodeInserted.noimagelightbox', initNoImageLightbox);	}(jQuery, mediaWiki, window)); }