Widget:costumeSwitcher: Difference between revisions
Jump to navigation
Jump to search
m Typo |
Added document-ready wait functionality as the MediaWiki does not wait for DOM |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><script> | <includeonly><script> | ||
RLQ.push(function () { | RLQ.push(['jquery', function () { | ||
$(document).ready(function() { | $(document).ready(function() { | ||
// Let's make sure the correct values are shown | // Let's make sure the correct values are shown | ||
$('.modswitcher').change(); | $('.modswitcher').change(); | ||
}); | }); | ||
}); | }]); | ||
function swap_mod(element) { | function swap_mod(element) { | ||
Line 75: | Line 75: | ||
selectBox.closest('.costumeContainer').find('.chibiAnimation,.live2dAnimation,.artTab').trigger("costume_changed", chibiCostumeName); | selectBox.closest('.costumeContainer').find('.chibiAnimation,.live2dAnimation,.artTab').trigger("costume_changed", chibiCostumeName); | ||
var basePath = " | var basePath = "https://en.gfwiki.com/images/"; // ToDo: find a better way to find out the base path | ||
var tdollId = selectBox.closest('.costumeContainer').find('.tdoll_chibi').data('tdollId'); | var tdollId = selectBox.closest('.costumeContainer').find('.tdoll_chibi').data('tdollId'); | ||
var costumeId = tdollId + chibiCostumeName; | var costumeId = tdollId + chibiCostumeName; |