From 9f6a2c0d601bc75e31e329d72152441b74ff6ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Mon, 11 Mar 2024 01:37:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E9=98=9F=E4=BC=8D=E8=A7=89=E9=86=92?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=EF=BC=8C=E5=A4=A7=E8=A1=80=E5=BC=BA=E5=88=B6?= =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E5=9C=A8=E7=AC=AC=E4=B8=80=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script.js | 13 +++++++------ service-worker.js | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/script.js b/script.js index 3a86768b..bd20a12b 100644 --- a/script.js +++ b/script.js @@ -3080,7 +3080,7 @@ function initialize() { icon.onclick = insertIconToText; insertAwokenIconList.appendChild(li); } - for (let id of new Set(Formation.pdcLatentMap.map(obj=>obj.pdf))) { + for (let id of Array.from(editBox.querySelectorAll(".setting-box .row-mon-latent details .m-latent-allowable-ul .latent-icon")).map(li=>li.getAttribute("data-latent-icon"))) { const li = document.createElement("li"); const icon = li.appendChild(createIndexedIcon('latent', id)); icon.onclick = insertIconToText; @@ -4994,10 +4994,10 @@ function initialize() { //潜觉 const monEditLatentUl = settingBox.querySelector(".row-mon-latent .latent-ul"); - const monEditLatents = Array.from(monEditLatentUl?.querySelectorAll("li")); + const monEditLatents = Array.from(monEditLatentUl?.querySelectorAll(".latent-icon")); const monEditLatentAllowableDetail = settingBox.querySelector(".row-mon-latent details"); const monEditLatentAllowableUl = monEditLatentAllowableDetail.querySelector(".m-latent-allowable-ul"); - const monEditLatentsAllowable = Array.from(monEditLatentAllowableUl.querySelectorAll("li")); + const monEditLatentsAllowable = Array.from(monEditLatentAllowableUl.querySelectorAll(".latent-icon")); monEditLatentAllowableDetail.open = localStorage_getBoolean(cfgPrefix + 'hide-latent'); monEditLatentAllowableDetail.onclick = function(event) { if (event instanceof Event) localStorage.setItem(cfgPrefix + 'hide-latent', Number(!this.open)); @@ -6528,8 +6528,9 @@ function refreshTeamAwokenEfeect(awokenEffectDom, team, ti) { //刷新队伍觉醒统计 function refreshTeamAwokenCount(awokenDom, team) { let fragment = document.createDocumentFragment(); //创建节点用的临时空间 - - official_awoken_sorting.forEach(ak=>{ + const awokenResort = new Set([46]); //队伍大血,强制排在第一位 + official_awoken_sorting.forEach(ak=>awokenResort.add(ak)); + awokenResort.forEach(ak=>{ let totalNum = 0; //搜索等效觉醒 const equivalentAwoken = equivalent_awoken.find(eak => eak.small === ak || eak.big === ak); @@ -6553,7 +6554,7 @@ function refreshTeamAwokenCount(awokenDom, team) { const span = li.appendChild(document.createElement("span")); span.className = "count"; span.textContent = totalNum; - fragment.appendChild(li); + fragment.append(li); }); const awokenUL = awokenDom.querySelector(".awoken-ul"); diff --git a/service-worker.js b/service-worker.js index 64ebf841..936a8b54 100644 --- a/service-worker.js +++ b/service-worker.js @@ -24059,7 +24059,7 @@ const cachesMap = new Map([ ], [ "script.js", - "03cb43c816ba5e40bb8b2c78b0c0fd45" + "fe34fc620da2685a01010a3fe7be523f" ], [ "solo.html",