◆少前百科是非盈利性、非官方的少女前线维基百科。
◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科
◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科
◆To foreigners,You can use twitter to contact us.
Icon Nyto Silver.png

更改

跳转至: 导航搜索

Widget:ChibiCostumeSwitcher

添加573字节2023年8月26日 (六) 00:04
无编辑摘要
<includeonly><style>div#content { overflow: clip;}</style><script>
/* Original widget created by en.gfwiki.com/wiki/User:Messing_with_data, Copied under Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) License */
RLQ.push(function () {
var selectBox = $(element);
const costumeSelectionIndex = selectBox.prop('selectedIndex'); console.log('costumeSelectionIndex', costumeSelectionIndex, costumeSelectionIndex != 0);
var chibiCostumeName = "";
if (costumeSelectionIndex != 0) {
chibiCostumeName = "_costume_" + costumeSelectionIndexselectBox.val()
}
var targetSelector = targetId == "" ? ".chibiAnimationContainer" : ("#" + targetId);
$(targetSelector).attr('data-tdoll-costume', chibiCostumeName);
$(targetSelector).find('.chibiAnimation').trigger("costume_changed", [chibiCostumeName]); if($(targetSelector).children('.chibiDormButton').hasClass('stateon')) { var currentDormButton = $(targetSelector).children('.chibiDormButton'); var futureEnabledState = currentDormButton.hasClass('stateoff'); if(futureEnabledState) { currentDormButton.addClass('stateon'); currentDormButton.removeClass('stateoff'); } else { currentDormButton.removeClass('stateon'); currentDormButton.addClass('stateoff'); } }
var tdollId = selectBox.closest('.costumeContainer').find('.tdoll_chibi').data('tdollId');
<option value="{{BASEPAGENAME}}" selected="selected">默认Q版</option>
<!--{foreach from=$costumes key=key item=item}-->
<!--{if $item key neq ''&& $item neq ""}--><option value="<!--{$key|escape:'html'}-->"><!--{$item|escape:'html'}--></option><!--{/if}-->
<!--{/foreach}-->
</select></includeonly>
{{#widget:ChibiCostumeSwitcher
|target=enemyChibiAnimation
|costumes.costume1mod=Elite formmod|costumes.costume2=Another variant|costumes.costume3=Third variant|costumes.costume4=|costumes.costume5=|costumes.costume6301=301
}}
<div id="enemyChibiAnimation" class="chibiAnimationContainer" data-tdoll-id="Executioner柯尔特左轮" data-tdoll-hidedormbutton="truefalse" style="border: thin dashed gray;">&nbsp;</div><p style="font-style: italic;">Original widget created by https://en.gfwiki.com/wiki/User:Messing_with_data, <b>Copied under Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) License</b></p></noinclude>

导航菜单