MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

importScriptPage('ReferencePopups/code.js', 'dev'); ((window.dev = window.dev || {}).ReferencePopups = dev.ReferencePopups || {}).lockdown = true; /* //////////////////////////////////////////////////////////////////// // SpoilerAlert // documentation at: http://dev.wikia.com/wiki/SpoilerAlert // © Peter Coester, 2012 // // __NOWYSIWYG__ //////////////////////////////////////////////////////////////////// (function {    var cats = mw.config.get('wgCategories'),        spoiler = $.inArray('Spoilers', cats) !== -1,        mature  = $.inArray('Mature content',cats) !== -1;    window.SpoilerAlert = {};    window.SpoilerAlert.isSpoiler = function  {            return spoiler || mature;    };    if (mature && spoiler) {        window.SpoilerAlert.question = 'This page may contain spoilers about unreleased or newly released stories. I Are you absolutely sure you want to read it?';    } else if (mature) {        window.SpoilerAlert.question = 'This page may contain mature content that may not be suitable for all users. Are you absolutely sure you want to read it?';    } else if (spoiler) {        window.SpoilerAlert.question = 'This page may contain spoilers about unreleased or newly released stories. Are you absolutely sure you want to read it?'; } }); importScriptPage('SpoilerAlert/code.js', 'dev'); /* //////////////////////////////////////////////////////////////// // THE BELOW CODE HELPS MAKE THE NAVIGATION TEMPLATE COLLAPSIBLE //////////////////////////////////////////////////////////////// /* == Import Show-Hide JS == */ /* dev.wikia.com/wiki/ShowHide/code.js */ /* dev.wikia.com/wiki/ShowHide */ importScriptPage('ShowHide/code.js', 'dev');