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

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

来自少前百科GFwiki
跳转至: 导航搜索
(测试)
 
(未显示3个用户的71个中间版本)
第1行: 第1行:
 
<includeonly><style type="text/css">
 
<includeonly><style type="text/css">
 +
/* Auto Grid START */
 +
@media screen and (max-width: 900px) {
 +
#Equiptable:not(.minimode) tr::after {content:"";grid-column: auto/span 2;grid-row-start: 2 ;background: linear-gradient(45deg, rgb(85 85 85 / 47%), rgb(85 85 85 / 47%));background-repeat: no-repeat;background-position: 1px 1px;background-size: calc(100% - 2px) calc(100% - 2px);}
 +
 +
.skin-minerva #Equiptable:not(.minimode) tr::after{background-image: linear-gradient(45deg, rgb(119 119 119 / 0.34), rgb(119 119 119 / 0.34));}
 +
.skin-minerva table#Equiptable:not(.minimode) tr td {border-width:1px !important}
 +
#Equiptable:not(.minimode) tr {background:transparent !important;}
 +
 +
@media screen and (max-width: 500px) {
 +
    .skin-minerva #Equiptable *{font-size:0.8rem;}
 +
}
 +
    .skin-vector #Equiptable:not(.minimode) td {}
 +
    .skin-vector #Equiptable:not(.minimode) td {margin:1px;background-color:rgb(85 85 85 / 47%)}
 +
    .skin-vector #Equiptable:not(.minimode) td:hover {background-color:rgb(119 119 119 / 47%)}
 +
    .skin-vector #Equiptable:not(.minimode) tbody {background:transparent}
 +
table#Equiptable:not(.minimode) td:empty,table#Equiptable thead {display:none}
 +
table#Equiptable:not(.minimode) tr td:nth-child(2) {display:inline-block;width:100px}
 +
table#Equiptable:not(.minimode) tbody tr {
 +
    grid-template-columns: 20% 20% 20% 20% 1fr;
 +
    grid-template-rows: initial;
 +
    grid-template-areas: initial;
 +
    grid-auto-flow: row;
 +
    grid-auto-columns: initial;
 +
    grid-auto-rows: initial;
 +
    display: grid;
 +
    margin: 2px 0;
 +
    padding: 1px;
 +
    border: 1px solid #f4c430;
 +
}
 +
table#Equiptable:not(.minimode) tbody {display: block;width:100%;}
 +
table#Equiptable:not(.minimode) tr td{display: flex;align-items: center;flex-direction: column;flex-wrap: nowrap;align-content: center;justify-content: center;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(1)::before {content:"装备名称\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(1) {grid-column:auto/span 3;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(2) img {width:100% !important;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(2) {grid-column:auto/span 1;width: auto;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(3)::before {content:"装备类型\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(3) {grid-column:auto/span 1;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(4)::before {content:"伤害\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(4) {grid-column:auto/span 1;grid-row-start: 2;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(5)::before {content:"命中\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(5) {grid-column:auto/span 1;grid-row-start: 2;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(6)::before {content:"回避\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(6) {grid-column:auto/span 1;grid-row-start: 2;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(7)::before {content:"射速\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(7) {grid-column:auto/span 1;grid-row-start: 2;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(8)::before {content:"暴击\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(8) {grid-column:auto/span 1;grid-row-start: 2;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(9)::before {content:"暴伤\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(9) {grid-column:auto/span 1;grid-row-start: 2;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(10)::before {content:"穿甲\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(10) {grid-column:auto/span 1;grid-row-start: 2;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(11)::before {content:"护甲\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(11) {grid-column:auto/span 1;grid-row-start: 2;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(12)::before {content:"夜视\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(12) {grid-column:auto/span 1;grid-row-start: 2;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(13)::before {content:"弹量\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(13) {grid-column:auto/span 1;grid-row-start: 2;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(14)::before {content:"移速\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(14) {grid-column:auto/span 1;grid-row-start: 2;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(15)::before {content:"效果\A";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(15) {grid-column:5/span 1;grid-row-start: 2;}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(16)::before {content: "适用人形:";white-space: pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(16){grid-column:1/span 3;flex-direction:row;flex-wrap: wrap;padding:4px 0}
 +
table#Equiptable:not(.minimode) tr td:nth-child(16) a::before{content: "  ";white-space: pre;text-decoration:none !important}
 +
table#Equiptable:not(.minimode) tr td:nth-child(16) a:first-child::before{content: "";text-decoration:none !important}
 +
table#Equiptable:not(.minimode) tr td:nth-child(16) a {white-space:nowrap}
 +
 +
table#Equiptable:not(.minimode) tr td:nth-child(17)::before {content:"获得途径:";white-space:pre;}
 +
table#Equiptable:not(.minimode) tr td:nth-child(17) {grid-column:auto/span 2;width: auto;display: flex;flex-direction: row;}
 +
}
 +
/* Auto Grid END */
 +
/* 精简模式START */
 +
body.skin-vector .minimode tbody {background:transparent !important}
 +
body.skin-vector .minimode tbody td {background:rgb(128 128 128 / 0.5);margin:2px}
 +
table#Equiptable.minimode * {display:block}
 +
table#Equiptable.minimode thead {display:none}
 +
table#Equiptable.minimode tr :not(td:nth-child(2)) {display:none}
 +
table#Equiptable.minimode tr td:nth-child(2) img ,table#Equiptable.minimode tr td:nth-child(2) a,table#Equiptable.minimode tr {display:inline-block}
 +
@media screen and (max-width: 640px) {
 +
    table#Equiptable.minimode tr {width:20%}
 +
    table#Equiptable.minimode tr td:nth-child(2) img {width:100% !important}
 +
    table#Equiptable.minimode tr td:nth-child(2) {width:100%! }
 +
}
 +
table#Equiptable.minimode tr td:nth-child(2):hover {
 +
  background-color:#f4c430
 +
}
 +
table#Equiptable.minimode tr td:nth-child(2) {transition: 0.2s all ease-in-out;}
 +
/* 精简模式END */
 
.error {background-color: red;font-size: inherit;color: inherit;}
 
.error {background-color: red;font-size: inherit;color: inherit;}
 
div.tileSearchCond {
 
div.tileSearchCond {
第26行: 第129行:
 
     position:relative;
 
     position:relative;
 
}
 
}
div#buttonContainer span:first-child {
+
//div#buttonContainer span:first-child {
    float:right;
+
//    float:right;
    margin-right: 1rem;
+
//  margin-right: 1rem;
}
+
//}
 
.skin-minerva #content div#buttonContainer div:not(#TDollQuery) button {
 
.skin-minerva #content div#buttonContainer div:not(#TDollQuery) button {
 
     padding: 6px 15px;
 
     padding: 6px 15px;
第233行: 第336行:
 
color:#f4c430;
 
color:#f4c430;
 
}
 
}
.sort-list>label>input[data-sort-order=desc]:checked + div:after {
+
#buttonContainer .sort-list>label>input[data-sort-order=desc]:checked + div:after {
 
content:'';
 
content:'';
 
display:block;
 
display:block;
第245行: 第348行:
 
z-index:1;
 
z-index:1;
 
}
 
}
.sort-list>label>input[data-sort-order=desc]:checked + div:before {
+
#buttonContainer .sort-list>label>input[data-sort-order=desc]:checked + div:before {
 
     content: '';
 
     content: '';
 
     display: block;
 
     display: block;
第259行: 第362行:
 
}
 
}
  
.sort-list>label>input[data-sort-order=asc]:checked + div:after {
+
#buttonContainer .sort-list>label>input[data-sort-order=asc]:checked + div:after {
 
     content: '';
 
     content: '';
 
     display: block;
 
     display: block;
第271行: 第374行:
 
     z-index: 1;
 
     z-index: 1;
 
}
 
}
.sort-list>label>input[data-sort-order=asc]:checked + div:before {
+
#buttonContainer .sort-list>label>input[data-sort-order=asc]:checked + div:before {
 
content: '';
 
content: '';
 
     display: block;
 
     display: block;
第285行: 第388行:
 
}
 
}
  
 +
table.dollTable {
 +
    display: table;
 +
    width: 100%;
 +
    background-color: #111;
 +
    border: 1px solid #888;
 +
    text-align: center;
 +
    margin-bottom: 5px;
 +
}
 +
 +
table.dollTable td {
 +
    border: 1px solid #333;
 +
    background-color: #222;
 +
    padding: 3px;
 +
}
  
 +
table.dollTable th {
 +
    border: 1px solid #f4c430;
 +
    background-color: #f4c430;
 +
    color: black;
 +
    padding: 3px;
 +
}
 
<!--{if ($hideinput)==1}-->div#TDollQuery {display:none;}<!--{/if}-->
 
<!--{if ($hideinput)==1}-->div#TDollQuery {display:none;}<!--{/if}-->
</style><div style="max-width: 65rem;">
+
</style><div style="max-width: 70rem;">
 
<div id="buttonContainer" style="margin: 2px;">
 
<div id="buttonContainer" style="margin: 2px;">
 +
<div>
 +
<button class="clearSelect">清除</button>
 +
<button class="invertSelect">反选</button>
 +
<label for="type1gx"><input type="checkbox" id="type1gx" class="filter_item" /><div>特殊配件</div></label>
 +
<label for="type1qx"><input type="checkbox" id="type1qx" class="filter_item" /><div>特殊弹匣</div></label>
 +
<label for="type1hd"><input type="checkbox" id="type1hd" class="filter_item" /><div>特殊人形装备</div></label>
 +
</div>
 
<div>
 
<div>
 
<button class="clearSelect">清除</button>
 
<button class="clearSelect">清除</button>
第298行: 第428行:
 
<label for="MGEquip"><input type="checkbox" id="MGEquip" class="filter_item" /><div>机枪装备</div></label>
 
<label for="MGEquip"><input type="checkbox" id="MGEquip" class="filter_item" /><div>机枪装备</div></label>
 
<label for="SGEquip"><input type="checkbox" id="SGEquip" class="filter_item" /><div>霰弹枪装备</div></label>
 
<label for="SGEquip"><input type="checkbox" id="SGEquip" class="filter_item" /><div>霰弹枪装备</div></label>
</div>
 
<div>
 
<button class="clearSelect">清除</button>
 
<button class="invertSelect">反选</button>
 
<label for="type1gx"><input type="checkbox" id="type1gx" class="filter_item" /><div>光学瞄具</div></label>
 
<label for="type1qx"><input type="checkbox" id="type1qx" class="filter_item" /><div>全息瞄具</div></label>
 
<label for="type1hd"><input type="checkbox" id="type1hd" class="filter_item" /><div>红点瞄具</div></label>
 
<label for="type1yz"><input type="checkbox" id="type1yz" class="filter_item" /><div>夜战装备</div></label>
 
<label for="type1xy"><input type="checkbox" id="type1xy" class="filter_item" /><div>消音器</div></label>
 
<label for="type1ts"><input type="checkbox" id="type1ts" class="filter_item" /><div>特殊</div></label>
 
</div>
 
<div>
 
<button class="clearSelect">清除</button>
 
<button class="invertSelect">反选</button>
 
<label for="type2zt"><input type="checkbox" id="type2zt" class="filter_item" /><div>状态弹</div></label>
 
<label for="type2cj"><input type="checkbox" id="type2cj" class="filter_item" /><div>穿甲弹</div></label>
 
<label for="type2gs"><input type="checkbox" id="type2gs" class="filter_item" /><div>高速弹</div></label>
 
<label for="type2xd"><input type="checkbox" id="type2xd" class="filter_item" /><div>霰弹</div></label>
 
<label for="type2ts"><input type="checkbox" id="type2ts" class="filter_item" /><div>特殊</div></label>
 
</div>
 
<div>
 
<button class="clearSelect">清除</button>
 
<button class="invertSelect">反选</button>
 
<label for="type3wg"><input type="checkbox" id="type3wg" class="filter_item" /><div>外骨骼</div></label>
 
<label for="type3wz"><input type="checkbox" id="type3wz" class="filter_item" /><div>伪装披风</div></label>
 
<label for="type3fd"><input type="checkbox" id="type3fd" class="filter_item" /><div>防弹插板</div></label>
 
<label for="type3dl"><input type="checkbox" id="type3dl" class="filter_item" /><div>弹链箱</div></label>
 
<label for="type3xp"><input type="checkbox" id="type3xp" class="filter_item" /><div>芯片</div></label>
 
<label for="type3ts"><input type="checkbox" id="type3ts" class="filter_item" /><div>特殊</div></label>
 
 
</div>
 
</div>
 
<div>
 
<div>
第334行: 第435行:
 
<label for="Obtaincz"><input type="checkbox" id="Obtaincz" class="filter_item" /><div>常驻活动</div></label>
 
<label for="Obtaincz"><input type="checkbox" id="Obtaincz" class="filter_item" /><div>常驻活动</div></label>
 
<label for="Obtainxs"><input type="checkbox" id="Obtainxs" class="filter_item" /><div>限时活动</div></label>
 
<label for="Obtainxs"><input type="checkbox" id="Obtainxs" class="filter_item" /><div>限时活动</div></label>
 +
<label for="Obtainph"><input type="checkbox" id="Obtainph" class="filter_item" /><div>排行奖励</div></label>
 
<label for="Obtainxz"><input type="checkbox" id="Obtainxz" class="filter_item" /><div>心智升级</div></label>
 
<label for="Obtainxz"><input type="checkbox" id="Obtainxz" class="filter_item" /><div>心智升级</div></label>
<label for="Obtainhs"><input type="checkbox" id="Obtainhs" class="filter_item" /><div>黑市商店</div></label>
+
<label for="Obtainhs"><input type="checkbox" id="Obtainhs" class="filter_item" /><div>机密商店</div></label>
 +
<label for="Obtainmy"><input type="checkbox" id="Obtainmy" class="filter_item" /><div>每月签到</div></label>
 +
<label for="Obtainhy"><input type="checkbox" id="Obtainhy" class="filter_item" /><div>灰域探查</div></label>
 
</div>
 
</div>
  
 
<div class="sort-list">
 
<div class="sort-list">
<label><div>排序</div></label>
+
<label for="liteMode"><input type="checkbox" id="liteMode"/><div>精简模式</div></label><span>&nbsp;&nbsp;</span>
 +
<label><div>排序:</div></label>
 
<label><input type="radio" id="sortReldate" name="sort"><div>实装日期</div></label>
 
<label><input type="radio" id="sortReldate" name="sort"><div>实装日期</div></label>
 
<label><input type="radio" id="sortAtk" name="sort"><div>伤害</div></label>
 
<label><input type="radio" id="sortAtk" name="sort"><div>伤害</div></label>
<label><input type="radio" id="sortRate" name="sort"><div>射速</div></label>
 
 
<label><input type="radio" id="sortAcc" name="sort"><div>命中</div></label>
 
<label><input type="radio" id="sortAcc" name="sort"><div>命中</div></label>
 
<label><input type="radio" id="sortEva" name="sort"><div>回避</div></label>
 
<label><input type="radio" id="sortEva" name="sort"><div>回避</div></label>
<label><input type="radio" id="sortArmor" name="sort"><div>护甲</div></label>
+
<label><input type="radio" id="sortRate" name="sort"><div>射速</div></label>
<label><input type="radio" id="sortampierce" name="sort"><div>穿甲</div></label>
 
 
<label><input type="radio" id="sortcriper" name="sort"><div>暴击</div></label>
 
<label><input type="radio" id="sortcriper" name="sort"><div>暴击</div></label>
 
<label><input type="radio" id="sortcrirate" name="sort"><div>暴伤</div></label>
 
<label><input type="radio" id="sortcrirate" name="sort"><div>暴伤</div></label>
 +
<label><input type="radio" id="sortampierce" name="sort"><div>穿甲</div></label>
 +
<label><input type="radio" id="sortArmor" name="sort"><div>护甲</div></label>
 +
<label><input type="radio" id="sortnight" name="sort"><div>夜视</div></label>
 
<label><input type="radio" id="sortbullet" name="sort"><div>弹量</div></label>
 
<label><input type="radio" id="sortbullet" name="sort"><div>弹量</div></label>
 
<label><input type="radio" id="sortmove" name="sort"><div>移速</div></label>
 
<label><input type="radio" id="sortmove" name="sort"><div>移速</div></label>
<label><input type="radio" id="sorttarget" name="sort"><div>目标</div></label>
+
<label><input type="radio" id="sortskill" name="sort"><div>效果</div></label>
<label><input type="radio" id="sortnight" name="sort"><div>夜视</div></label>
 
 
</div>
 
</div>
 
<div id="position-marker"></div>
 
<div id="position-marker"></div>
</div></div><BR></includeonly>
+
</div></div><BR>
 +
<script type="text/javascript">
 +
 
 +
var equipElement = document.querySelectorAll('.equipdata');
 +
equipElement.forEach(function(el,i){el.dataset.nameIngame=el.dataset.nameIngame.replaceAll("_"," ")})
 +
var equipTarget = new Array(1000);
 +
//if (document.body.className.indexOf("skin-minerva")>-1&&document.body.clientWidth<650){document.querySelector("#liteMode").checked=true}
 +
for (var k = 0; k < 1000; k++) { equipTarget[k] = -1; }
 +
 
 +
var gunTypeStr = ["特殊配件", "特殊弹匣", "特殊人形"];
 +
var gunDollStr = ["HG", "SMG", "AR", "RF", "MG", "SG"];
 +
var gunGetStr = ["主线战役", "常驻活动", "限时活动", "排行奖励", "心智升级", "机密商店" , "每月签到", "灰域探查"];
 +
 
 +
var equipCheckbox = document.querySelectorAll('.filter_item');
 +
for (var i = 0; i < equipCheckbox.length; i++) {
 +
    equipCheckbox[i].addEventListener('click', reloadEquip);
 +
    equipCheckbox[i].checked = true;
 +
}
 +
 
 +
function reloadEquip() {    //重新加载
 +
    for (var k = 0; k < 1000; k++) { equipTarget[k] = -1; }
 +
    for (var i = 0; i < equipElement.length; i++) {
 +
        checkGunDollStr(i);
 +
    }
 +
    revealEquip();
 +
}
 +
 
 +
function checkGunDollStr(i) {  //装备枪种
 +
    for (var j = 0; j < gunDollStr.length; j++) {
 +
        if (equipCheckbox[j + gunTypeStr.length].checked == false) continue;
 +
        if (gunDollStr[j] == equipElement[i].getAttribute('data-equip-dolltype')) {
 +
            checkGunTypeStr(i);
 +
            return;
 +
        }
 +
    }
 +
}
 +
 
 +
function checkGunTypeStr(i) {  //装备种类
 +
    var equipClass2 = equipElement[i].getAttribute('data-equip-class2');
 +
    for (var j = 0; j < gunTypeStr.length; j++) {
 +
        if (equipCheckbox[j].checked == false) continue;
 +
        if (equipClass2 == gunTypeStr[j]) {
 +
            checkGunGetStr(i);
 +
            return;
 +
        }
 +
    }
 +
}
 +
 
 +
function checkGunGetStr(i) {    //获得途径
 +
    for (var j = 0; j < gunGetStr.length; j++) {
 +
        if (equipCheckbox[j + gunDollStr.length + gunTypeStr.length].checked == false) continue;
 +
        if (equipElement[i].getAttribute('data-obtain') == gunGetStr[j]) {
 +
            equipPrep(i);
 +
            return;
 +
        }
 +
    }
 +
}
 +
 
 +
function equipPrep(i) {    //输出准备
 +
    for (var j = 0; j < 1000; j++) {
 +
        if (equipTarget[j] == -1) { equipTarget[j] = i; return; }
 +
    }
 +
}
 +
 
 +
var positionT = document.querySelector('#position-marker');
 +
function revealEquip() {    //最终输出
 +
    positionT.innerHTML = "";
 +
 
 +
    var htmlline = "";
 +
    for (var j = 0; j < 1000; j++) {
 +
        if (equipTarget[j] == -1) break;
 +
        var tar = equipElement[equipTarget[j]];
 +
 
 +
        var thisline = "<tr><td>";
 +
       thisline += "<a href=\"" + tar.getAttribute('data-url') + "\"><b>" + tar.getAttribute('data-name-ingame').replace("(", "<br>(") + "<\/b><\/a><\/td><td>";
 +
        thisline += `<a title="${tar.getAttribute('data-name-ingame').replace("(", "<br>(")}" href="${tar.getAttribute('data-url')}"><img style="width:100px;" src="${tar.getAttribute('data-avatar')}" \/><\/a><\/td><td>`;
 +
        thisline += tar.getAttribute('data-equip-class1') + "<\/br>" + tar.getAttribute('data-equip-class2') + "<\/td><td>";
 +
        thisline += (tar.getAttribute('data-base-atk') != "0" ? tar.getAttribute('data-base-atk') : "") + "<\/td><td>";
 +
        thisline += (tar.getAttribute('data-base-acc') != "0" ? tar.getAttribute('data-base-acc') : "") + "<\/td><td>";
 +
        thisline += (tar.getAttribute('data-base-eva') != "0" ? tar.getAttribute('data-base-eva') : "") + "<\/td><td>";
 +
        thisline += (tar.getAttribute('data-base-rate') != "0" ? tar.getAttribute('data-base-rate') : "") + "<\/td><td>";
 +
        thisline += (tar.getAttribute('data-base-criper') != "0" ? tar.getAttribute('data-base-criper') : "") + "<\/td><td>";
 +
        thisline += (tar.getAttribute('data-base-crirate') != "0" ? tar.getAttribute('data-base-crirate') : "") + "<\/td><td>";
 +
        thisline += (tar.getAttribute('data-base-ampierce') != "0" ? tar.getAttribute('data-base-ampierce') : "") + "<\/td><td>";
 +
        thisline += (tar.getAttribute('data-base-armor') != "0" ? tar.getAttribute('data-base-armor') : "") + "<\/td><td>";
 +
        thisline += (tar.getAttribute('data-base-night') != "0" ? tar.getAttribute('data-base-night') : "") + "<\/td><td>";
 +
        thisline += (tar.getAttribute('data-base-bullet') != "0" ? tar.getAttribute('data-base-bullet') : "") + "<\/td><td>";
 +
        thisline += (tar.getAttribute('data-base-move') != "0" ? tar.getAttribute('data-base-move') : "") + "<\/td><td>";
 +
       thisline += (tar.getAttribute('data-base-skill') == "1" ? "○" : "×") + "<\/td><td>";
 +
        thisline += toDollName(j) + "<\/td><td>";
 +
        thisline += tar.getAttribute('data-obtain') + "<\/td><\/tr>";
 +
       //'<td>装备<\/td><td>图标<\/td><td>类型<\/td><td>伤害<\/td><td>命中<\/td><td>回避<\/td><td>射速<\/td><td>暴击<\/td><td>暴伤<\/td><td>穿甲<\/td><td>夜视<\/td><td>弹量<\/td><td>移速<\/td><td>效果<\/td><td>适用人形<\/td><td>获得途径<\/td>'
 +
        htmlline += thisline;
 +
    }
 +
 
 +
    var output = `<table id="Equiptable" class="dollTable ${liteCheck()}" style="text-align:center; mid-width:300px; width:100%;">`;
 +
    output += `<thead><tr><th style="min-width:120px;max-width:120px">装备<\/th><th style="min-width:110px;max-width:110px">图标<\/th><th>类型<\/th><th>伤害<\/th><th>命中<\/th><th>回避<\/th><th>射速<\/th><th>暴击<\/th><th>暴伤<\/th><th>穿甲<\/th><th>护甲<\/th><th>夜视<\/th><th>弹量<\/th><th>移速<\/th><th>效果<\/th><th style="width:110px; text-align:center;">适用人形<\/th><th>获得途径<\/th><\/tr><\/thead>`;
 +
    output += `<tbody id="Equiptbody">` + htmlline + `<\/tbody><\/table>`;
 +
    positionT.innerHTML = output;
 +
}
 +
 
 +
var clearSel = document.querySelectorAll('.clearSelect');
 +
var invertSel = document.querySelectorAll('.invertSelect');
 +
for (var x = 0; x < clearSel.length; x++) { clearSel[x].addEventListener("click", function () { clearSelect(this); }); }
 +
for (var y = 0; y < invertSel.length; y++) { invertSel[y].addEventListener("click", function () { invertSelect(this); });
 +
}
 +
 
 +
function liteCheck(){if(document.querySelector("#liteMode").checked){return "minimode"}else{return ""}}
 +
 
 +
function invertSelect(box) {//反选函数
 +
    var get_checker_box = box.parentNode.getElementsByTagName("input");
 +
    for (var i = 0; i < get_checker_box.length; i++) {
 +
        if (get_checker_box[i].dataset.freeze) { continue; }
 +
        if (get_checker_box[i].checked) { get_checker_box[i].checked = false } else { get_checker_box[i].checked = true }
 +
    }
 +
    reloadEquip();
 +
}
 +
 
 +
function clearSelect(box) { //清除选择
 +
    var get_checker_box = box.parentNode.getElementsByTagName("input");
 +
    for (var i = 0; i < get_checker_box.length; i++) {
 +
        if (get_checker_box[i].dataset.freeze) { continue; }
 +
        get_checker_box[i].checked = false
 +
    }
 +
    reloadEquip();
 +
}
 +
 
 +
function toDollName(i) { //Name模板
 +
    var thisDoll = equipElement[equipTarget[i]];
 +
    let tdolls = [];
 +
    for (let i = 1; i < 4; i++) {
 +
        let tdoll = thisDoll.dataset['equipDollname'+i];
 +
        if (tdoll !== undefined) tdolls.push(`<a href="/w/${tdoll.replace(' ', '_')}">${tdoll}</a>`);
 +
    }
 +
    return tdolls.join(`<br>`);
 +
}
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
var index = document.querySelectorAll("input[name=sort]");
 +
for (var i = 0; i < index.length; i++) {
 +
index[i].setAttribute("data-sort-order", "desc");
 +
index[i].addEventListener("click", function () { sortStatusChange(this); });
 +
}
 +
index[0].checked = true;
 +
var lastSort = index[0];
 +
var sortOrder = -1;
 +
 
 +
function sortStatusChange(obj) {  //排序准备
 +
if (obj == lastSort && obj.dataset.sortOrder == "desc") {
 +
obj.setAttribute("data-sort-order", "asc"); }
 +
else { obj.setAttribute("data-sort-order", "desc"); }
 +
if (obj.dataset.sortOrder == "asc") { sortOrder = 1 } else { sortOrder = -1 }
 +
lastSort = obj;
 +
inOrder();
 +
}
 +
 
 +
function inOrder() { //排序交换位置
 +
var sortType = "data-id";
 +
switch(lastSort.getAttribute("id")){
 +
case "sortReldate": sortType = "data-id"; break;
 +
case "sortAtk": sortType = "data-base-atk"; break;
 +
case "sortAcc": sortType = "data-base-acc"; break;
 +
case "sortEva": sortType = "data-base-eva"; break;
 +
case "sortRate": sortType = "data-base-rate"; break;
 +
case "sortcriper": sortType = "data-base-criper"; break;
 +
case "sortcrirate": sortType = "data-base-crirate"; break;
 +
case "sortampierce":sortType = "data-base-ampierce"; break;
 +
case "sortArmor": sortType = "data-base-armor"; break;
 +
case "sortnight": sortType = "data-base-night"; break;
 +
case "sortbullet": sortType = "data-base-bullet"; break;
 +
case "sortmove": sortType = "data-base-move"; break;
 +
case "sortskill": sortType = "data-base-skill"; break;
 +
default: sortType = "data-id"; break;
 +
}
 +
 
 +
for (var j = 1; ; j++) {
 +
if (equipTarget[j] == -1) break;
 +
for(var k = 0; k < j ; k++){
 +
var thisAttri = Number(equipElement[equipTarget[j]].getAttribute(sortType));
 +
var lastAttri = Number(equipElement[equipTarget[k]].getAttribute(sortType));
 +
if ((thisAttri > lastAttri && sortOrder == -1) || (thisAttri < lastAttri && sortOrder == 1)) {
 +
var exchange = equipTarget[j];
 +
for(var l = j; l >= k; l--){ equipTarget[l] = equipTarget[l-1];}
 +
equipTarget[k] = exchange;
 +
break;
 +
}
 +
}
 +
}
 +
revealEquip();
 +
}
 +
 
 +
//首次输出
 +
for (var i = 0; i < equipElement.length; i++) { equipPrep(i); }
 +
revealEquip();
 +
 
 +
document.querySelector("#liteMode").addEventListener("click", function(e){var a = document.querySelector("#Equiptable");if(e.target.checked){a.classList.add("minimode")}else{a.classList.remove("minimode")}})
 +
</script></includeonly>

2024年4月13日 (六) 01:34的最新版本