◆少前百科是非盈利性、非官方的少女前线维基百科。 ◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科。 ◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科 ◆To foreigners,You can use twitter to contact us. |
“Widget:Equipquery”的版本间的差异
(change class) |
|||
(未显示2个用户的10个中间版本) | |||
第412行: | 第412行: | ||
</style><div style="max-width: 70rem;"> | </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> | ||
第421行: | 第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> | ||
<div> | <div> | ||
第459行: | 第437行: | ||
<label for="Obtainph"><input type="checkbox" id="Obtainph" 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> | + | <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="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> | ||
第483行: | 第462行: | ||
</div></div><BR> | </div></div><BR> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
+ | |||
var equipElement = document.querySelectorAll('.equipdata'); | var equipElement = document.querySelectorAll('.equipdata'); | ||
equipElement.forEach(function(el,i){el.dataset.nameIngame=el.dataset.nameIngame.replaceAll("_"," ")}) | equipElement.forEach(function(el,i){el.dataset.nameIngame=el.dataset.nameIngame.replaceAll("_"," ")}) | ||
第489行: | 第469行: | ||
for (var k = 0; k < 1000; k++) { equipTarget[k] = -1; } | for (var k = 0; k < 1000; k++) { equipTarget[k] = -1; } | ||
− | + | var gunTypeStr = ["特殊配件", "特殊弹匣", "特殊人形"]; | |
var gunDollStr = ["HG", "SMG", "AR", "RF", "MG", "SG"]; | var gunDollStr = ["HG", "SMG", "AR", "RF", "MG", "SG"]; | ||
− | + | var gunGetStr = ["主线战役", "常驻活动", "限时活动", "排行奖励", "心智升级", "机密商店" , "每月签到", "灰域探查"]; | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | var gunGetStr = ["主线战役", "常驻活动", "限时活动", "排行奖励", "心智升级", " | ||
var equipCheckbox = document.querySelectorAll('.filter_item'); | var equipCheckbox = document.querySelectorAll('.filter_item'); | ||
第516行: | 第489行: | ||
function checkGunDollStr(i) { //装备枪种 | function checkGunDollStr(i) { //装备枪种 | ||
for (var j = 0; j < gunDollStr.length; j++) { | for (var j = 0; j < gunDollStr.length; j++) { | ||
− | if (equipCheckbox[j].checked == false) continue; | + | if (equipCheckbox[j + gunTypeStr.length].checked == false) continue; |
if (gunDollStr[j] == equipElement[i].getAttribute('data-equip-dolltype')) { | if (gunDollStr[j] == equipElement[i].getAttribute('data-equip-dolltype')) { | ||
checkGunTypeStr(i); | checkGunTypeStr(i); | ||
第525行: | 第498行: | ||
function checkGunTypeStr(i) { //装备种类 | function checkGunTypeStr(i) { //装备种类 | ||
− | |||
var equipClass2 = equipElement[i].getAttribute('data-equip-class2'); | var equipClass2 = equipElement[i].getAttribute('data-equip-class2'); | ||
− | for (var j = 0; j < | + | for (var j = 0; j < gunTypeStr.length; j++) { |
− | if (equipCheckbox[j | + | if (equipCheckbox[j].checked == false) continue; |
− | if ( | + | if (equipClass2 == gunTypeStr[j]) { |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
checkGunGetStr(i); | checkGunGetStr(i); | ||
return; | return; | ||
第552行: | 第510行: | ||
function checkGunGetStr(i) { //获得途径 | function checkGunGetStr(i) { //获得途径 | ||
for (var j = 0; j < gunGetStr.length; j++) { | for (var j = 0; j < gunGetStr.length; j++) { | ||
− | if (equipCheckbox[j + gunDollStr.length + | + | if (equipCheckbox[j + gunDollStr.length + gunTypeStr.length].checked == false) continue; |
if (equipElement[i].getAttribute('data-obtain') == gunGetStr[j]) { | if (equipElement[i].getAttribute('data-obtain') == gunGetStr[j]) { | ||
equipPrep(i); | equipPrep(i); | ||
第630行: | 第588行: | ||
function toDollName(i) { //Name模板 | function toDollName(i) { //Name模板 | ||
− | |||
var thisDoll = equipElement[equipTarget[i]]; | 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>`); | |
− | return | ||
} | } | ||