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

“Widget:ChibiCostumeSwitcher”的版本间的差异

来自少前百科GFwiki
跳转至: 导航搜索
2个标签移动版编辑移动网页编辑
 
(未显示3个用户的17个中间版本)
第1行: 第1行:
<includeonly><script>
+
<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 */
 
/* 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 () {
 
RLQ.push(function () {
第17行: 第20行:
 
   mw.loader.using(neededGadgets).then(function () {
 
   mw.loader.using(neededGadgets).then(function () {
 
     swap_costume_intern(element, targetId);
 
     swap_costume_intern(element, targetId);
 +
  },function () {var mobile=$("#section_0");
 +
      if (mobile.length == 0){console.error("Loading needed libraries failed");}
 +
      else {swap_costume_intern(element, targetId);}
 
   });
 
   });
 
}
 
}
第23行: 第29行:
 
         var selectBox = $(element);
 
         var selectBox = $(element);
 
          
 
          
         costumeSelectionIndex = selectBox.prop('selectedIndex');
+
         const costumeSelectionIndex = selectBox.prop('selectedIndex');
          
+
         console.log('costumeSelectionIndex', costumeSelectionIndex, costumeSelectionIndex != 0);
 
         var chibiCostumeName = "";
 
         var chibiCostumeName = "";
 
         if (costumeSelectionIndex != 0) {
 
         if (costumeSelectionIndex != 0) {
           chibiCostumeName = "_costume" + costumeSelectionIndex
+
           chibiCostumeName = "_"+selectBox.val()
 
         }
 
         }
       
 
 
         var targetSelector = targetId == "" ? ".chibiAnimationContainer" : ("#" + targetId);
 
         var targetSelector = targetId == "" ? ".chibiAnimationContainer" : ("#" + targetId);
 
         $(targetSelector).attr('data-tdoll-costume', chibiCostumeName);
 
         $(targetSelector).attr('data-tdoll-costume', chibiCostumeName);
         $(targetSelector).find('.chibiAnimation').trigger("costume_changed", 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');
 
         var tdollId = selectBox.closest('.costumeContainer').find('.tdoll_chibi').data('tdollId');
第49行: 第65行:
 
<option value="{{BASEPAGENAME}}" selected="selected">默认Q版</option>
 
<option value="{{BASEPAGENAME}}" selected="selected">默认Q版</option>
 
<!--{foreach from=$costumes key=key item=item}-->
 
<!--{foreach from=$costumes key=key item=item}-->
   <!--{if $item neq ''}--><option value="<!--{$key|escape:'html'}-->"><!--{$item|escape:'html'}--></option><!--{/if}-->
+
   <!--{if $key neq '' && $item neq ""}--><option value="<!--{$key|escape:'html'}-->"><!--{$item|escape:'html'}--></option><!--{/if}-->
 
<!--{/foreach}-->
 
<!--{/foreach}-->
 
</select></includeonly>
 
</select></includeonly>
第56行: 第72行:
 
{{#widget:ChibiCostumeSwitcher
 
{{#widget:ChibiCostumeSwitcher
 
|target=enemyChibiAnimation
 
|target=enemyChibiAnimation
|costumes.costume1=Elite form
+
|costumes.mod=mod
|costumes.costume2=Another variant
+
|costumes.301=301
|costumes.costume3=Third variant
 
|costumes.costume4=
 
|costumes.costume5=
 
|costumes.costume6=
 
 
}}
 
}}
<div id="enemyChibiAnimation" class="chibiAnimationContainer" data-tdoll-id="Executioner" data-tdoll-hidedormbutton="true" 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>
+
<div id="enemyChibiAnimation" class="chibiAnimationContainer" data-tdoll-id="柯尔特左轮" data-tdoll-hidedormbutton="false" 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>

2023年8月26日 (六) 00:04的最新版本


 

Original widget created by https://en.gfwiki.com/wiki/User:Messing_with_data, Copied under Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) License