User:Aphrodite Belleza/wikia.js

/* Scripts which are imported via MediaWiki:ImportJS //Common.js/CustomTab.js Common.js/DynamicStats.js Common.js/gridfiltering.js Common.js/itemGridfiltering.js Common.js/levelselect.js Common.js/levelselect2.js Common.js/StatWheel.js //Common.js/tabviewenhancements.js dev:DiscordModule/code.js dev:OggPlayer.js dev:Tooltips.js

mw.loader.using( ['mediawiki.util', 'jquery.client'], function { /* Begin of mw.loader.using callback */

/* Username replace function (Template:USERNAME)          * * Inserts user name into */ $(function {       if(typeof(disableUsernameReplace) !== 'undefined' && disableUsernameReplace || mw.config.get('wgUserName') === null) return;    $("span.insertusername").text(mw.config.get('wgUserName'));    }); /* Config for MediaWiki:Common.js/gridfiltering.js */ gridContainer = '#champion-grid'; gridFilters = { 'search': 'search', 'role': ['- All Characters -', ['Trio','Caretakers'], ['GF Escapees','GF Orphans'], ['GB Escapees','GV Escapees'], ['Non-Humans','Demons'], ['Goldy Pond Residents','Goldy Pond Resistance'], ['Demon associates','Others'], ],       'type': ['- Type -', ['Main','Allies'], ['Villains','Neutral'] ]   };

/* Flip Text */ (function {   function addHook {        $(".flipText1").show;        $(".flipText2").hide;        $(".flipText1, .flipText2").off;        $(".flipText1, .flipText2").click(function(e) { $(e.target).closest('span#container.container').children.toggle; });   }    $(addHook);    mw.hook('wikipage.content').add(addHook); });

/* Toggleable skill tabs */ mw.hook('wikipage.content').add(function(elem) {   $(elem).find('.skill-tabs:not(.made-skill-tabs)').each(function { var tabs = $(this).addClass('made-skill-tabs'); var dts = $(this).find('> dt'); if(dts.length === 2) tabs.addClass('toggle-tabs'); dts.each(function(i) {           var dt = $(this);            if(i > 0) {                dt.addClass('hidden-tab').find('+ dd').addClass('hidden-tab');                dt.prepend($(' « ').mousedown(function(e) {                    e.preventDefault;                }).click(function {                    dts.addClass('hidden-tab').find('+ dd').addClass('hidden-tab');                    $(dts[i-1]).removeClass('hidden-tab').find('+ dd').removeClass('hidden-tab');                }));            }            if(i < dts.length-1) {                dt.append($(' » ').mousedown(function(e) {                    e.preventDefault;                }).click(function {                    dts.addClass('hidden-tab').find('+ dd').addClass('hidden-tab');                    $(dts[i+1]).removeClass('hidden-tab').find('+ dd').removeClass('hidden-tab');                }));            }        }); }); });