MediaWiki:Wikia.js

/* Configuration for w:c:dev:I18n-js */ window.dev = window.dev || {}; window.dev.i18n = window.dev.i18n || {}; window.dev.i18n.overrides = window.dev.i18n.overrides || {};

/* Configuration for w:c:dev:AddRailModule */ window.AddRailModule = [{ //    page: 'Template:DiscordRailModule', prepend: true, maxAge: 86400, }, {   //     page: 'Template:DiscussionsRailModule', maxAge: 86400, }]; mw.hook('wikipage.content').add(function ($elem) {   $elem.filter('section.railModule.rail-module')         .find('span.wds-button>a:only-child')         .attr('class', 'wds-button')         .unwrap; });

/* Configuration for w:c:dev:AjaxRC */ window.ajaxSpecialPages = ['Recentchanges', 'WikiActivity', 'Log', 'Contributions', 'AbuseLog']; window.dev.i18n.overrides['AjaxRC'] = { 'ajaxrc-refresh-text': 'Auto refresh', 'ajaxrc-refresh-hover': 'Check to automatically refresh this page', };

/* Configuration for w:c:dev:InactiveUsers */ window.InactiveUsers = { months: 1 };

/* Configuration for w:c:dev:MassCategorization */ window.MassCategorizationGroups = ['sysop', 'content-moderator'];

/* * Hack: Prevent character page thumbnails in the Popular Pages rail module from turning out as crotch shots. * NB: As of 2019-02-21, we've received explicit dispensation from w:Help:Customization policy; see ticket #434578. * TODO: Remove once Wikia have implemented a proper fix. * For reference, see: *  - ; *  - ; *  - ; and *  - . */ (function {    'use strict';

function fixCrotchShotsInPopularPages { document.querySelectorAll('#recirculation-rail .thumbnails a:not(.rail-sponsored-content) > img[src*="/smart/"]').forEach(function (img) {           img.src = img.src.replace('/smart/', '/top-crop/');        }); }

var $rail = $('#WikiaRail'); if (!$rail.length) { return; }   if ($rail.filter('.is-ready').length) { fixCrotchShotsInPopularPages; } else { $rail.one('afterLoad.rail', function {            fixCrotchShotsInPopularPages;        }); } });