User:RampantLeaf/global.js

if (mw.config.get('wgCanonicalSpecialPageName') === 'Chat') { importScriptPage('ChatNotifications/code.js', 'dev'); }

$(document).ready(function{   $( ".wds-global-navigation__user-menu .wds-dropdown__content:not(.wds-is-not-scrollable) .wds-list" ).append( "Contribs" ); });

// New Applicable Games template const templateExists = $("#applicable-games").length; const emImg = ["//vignette.wikia.nocookie.net/epicmickey/images/9/91/Em-0.png/revision/latest", "//vignette.wikia.nocookie.net/epicmickey/images/c/ca/Em-1.png/revision/latest"]; const em2Img = ["//vignette.wikia.nocookie.net/epicmickey/images/7/73/Em2-0.png/revision/latest", "//vignette.wikia.nocookie.net/epicmickey/images/a/af/Em2-1.png/revision/latest"] const poiImg = ["//vignette.wikia.nocookie.net/epicmickey/images/c/ce/Poi-0.png/revision/latest", "//vignette.wikia.nocookie.net/epicmickey/images/7/71/Poi-1.png/revision/latest"]

function validateGameInput(val) { if(val !== undefined && (val === 1 || val === 0)) { return val; } else { return 0; } }

const em = validateGameInput($("#applicable-games").data("one")); const em2 = validateGameInput($("#applicable-games").data("two")); const poi = validateGameInput($("#applicable-games").data("poi"));

if (templateExists) { $(".page-header__contribution div:not([class])").prepend("  "); }