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}, // 'Template:DiscussionsRailModule',                    // ]; 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 };

/* External imports */ importArticles({   type: 'script',    articles: [        'w:c:admintools:MediaWiki:Wikia.js/editCount.js',    ] });

/* * Hack: Prevent character page thumbnails in the Popular Pages rail module from turning out as crotch shots. * NB: DO NOT SUBMIT FOR CODE REVIEW! We're waiting for explicit dispensation from w:Help:Customization policy; see ticket #434578. */ (function {    function fixCrotchShotsInPopularPages {        document.querySelectorAll('#recirculation-rail .thumbnails a:not(.rail-sponsored-content) > img[src*="/zoom-crop/"]').forEach(function (img) { img.src = img.src.replace('/zoom-crop/', '/top-crop/'); });   }

$rail = $('#WikiaRail'); if (!$rail.exists) { return; } if ($rail.find('.loading').exists) { $rail.one('afterLoad.rail', function {            fixCrotchShotsInPopularPages;        }); } else { fixCrotchShotsInPopularPages; } });