From d15aeb1bcb2219e85bb5f938e9bea61b4336521c 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, 5 Dec 2022 20:30:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E6=9D=A5=E6=98=AF=E6=83=B3=E7=94=A8cs?= =?UTF-8?q?s=20counter=E5=AE=9E=E7=8E=B0=E8=A7=89=E9=86=92=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E7=9A=84=E7=BB=9F=E8=AE=A1=EF=BC=8C=E4=BD=86=E6=98=AF?= =?UTF-8?q?=E5=90=8E=E6=9D=A5=E5=8F=91=E7=8E=B0=E6=97=A0=E6=B3=95=E5=9C=A8?= =?UTF-8?q?counter=E4=B8=BA0=E6=97=B6=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=95=B0?= =?UTF-8?q?=E5=AD=97=EF=BC=8C=E6=89=80=E4=BB=A5=E6=B2=A1=E6=9C=89=E5=AE=9E?= =?UTF-8?q?=E9=99=85=E5=8F=98=E5=8C=96=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- browser-compatibility.js | 1 + languages/en.css | 6 +- languages/ja.css | 6 +- languages/ko.css | 6 +- languages/zh-TW.css | 6 +- languages/zh.css | 6 +- multi.html | 236 ++++++++++++++++++++------------------- script.js | 22 ++-- service-worker.js | 24 ++-- solo.html | 236 ++++++++++++++++++++------------------- style.css | 77 +++++++------ triple.html | 236 ++++++++++++++++++++------------------- 12 files changed, 435 insertions(+), 427 deletions(-) diff --git a/browser-compatibility.js b/browser-compatibility.js index 6ebb972a..29b6b9e4 100644 --- a/browser-compatibility.js +++ b/browser-compatibility.js @@ -5,6 +5,7 @@ {name: "BigInt value (1n) / BigInt 数据类型(1n)", version:{firefox:79,chrome:67,safari:14}, url: "https://caniuse.com/bigint", test: ()=>!Boolean(eval("1n"))}, {name: "CSS selector: :is() / CSS选择器: :is()", version:{firefox:78,chrome:88,safari:14}, url: "https://caniuse.com/css-matches-pseudo", test: ()=>!Boolean(eval("document.querySelector(':is()') || true"))}, {name: "CSS selector: :where() / CSS选择器: :where()", version:{firefox:78,chrome:88,safari:14}, url: "https://caniuse.com/mdn-css_selectors_where", test: ()=>!Boolean(eval("document.querySelector(':where()') || true"))}, + {name: "CSS selector: :not() / CSS选择器: :not()", version:{firefox:84,chrome:88,safari:9}, url: "https://caniuse.com/css-not-sel-list", test: ()=>!Boolean(eval("document.querySelector(':not(html)') || true"))}, //{name: "Private class fields (#name) / 类私有域(#name)", version:{firefox:90,chrome:74,safari:14.5}, url: "https://caniuse.com/mdn-javascript_classes_private_class_fields", test: ()=>!Boolean(eval("class test {#v = 0;}; true;"))}, ] return features.filter(feature=>{ diff --git a/languages/en.css b/languages/en.css index a78e6ab7..e620b11e 100644 --- a/languages/en.css +++ b/languages/en.css @@ -385,10 +385,10 @@ label[for="default-level"]::after { content: "Clear"; } -.search-box .awoken-div::before{ - content: "▼Add Awoken"; +.search-box .awoken-div .all-awokens::before{ + content: "▼Awoken"; } -.search-box .sawoken-div details summary::before{ +.search-box .sawoken-detail summary::before{ content: "Super Awoken (OR)"; } .search-box .special-div::before{ diff --git a/languages/ja.css b/languages/ja.css index c6ae12d8..e7d6ae1b 100644 --- a/languages/ja.css +++ b/languages/ja.css @@ -377,10 +377,10 @@ label[for="default-level"]::after { content: "クリア"; } -.search-box .awoken-div::before{ - content: "▼追加覚醒"; +.search-box .awoken-div .all-awokens::before{ + content: "▼覚醒"; } -.search-box .sawoken-div details summary::before{ +.search-box .sawoken-detail summary::before{ content: "超覚醒(OR)"; } .search-box .special-div::before{ diff --git a/languages/ko.css b/languages/ko.css index 40397ee5..3567356c 100644 --- a/languages/ko.css +++ b/languages/ko.css @@ -373,10 +373,10 @@ label[for="default-level"]::after { content: "명확한"; } -.search-box .awoken-div::before{ - content: "▼각성 추가"; +.search-box .awoken-div .all-awokens::before{ + content: "▼각성"; } -.search-box .sawoken-div details summary::before{ +.search-box .sawoken-detail summary::before{ content: "슈퍼 각성(OR)"; } .search-box .special-div::before{ diff --git a/languages/zh-TW.css b/languages/zh-TW.css index 8ae6927c..ad1827b6 100644 --- a/languages/zh-TW.css +++ b/languages/zh-TW.css @@ -380,10 +380,10 @@ label[for="default-level"]::after { content: "清除"; } -.search-box .awoken-div::before{ - content: "▼添加覺醒"; +.search-box .awoken-div .all-awokens::before{ + content: "▼覺醒"; } -.search-box .sawoken-div details summary::before{ +.search-box .sawoken-detail summary::before{ content: "超覺醒(OR)"; } .search-box .special-div::before{ diff --git a/languages/zh.css b/languages/zh.css index 92598149..e0d62280 100644 --- a/languages/zh.css +++ b/languages/zh.css @@ -378,10 +378,10 @@ label[for="default-level"]::after { content: "清除"; } -.search-box .awoken-div::before{ - content: "▼添加觉醒"; +.search-box .awoken-div .all-awokens::before{ + content: "▼觉醒"; } -.search-box .sawoken-div details summary::before{ +.search-box .sawoken-detail summary::before{ content: "超觉醒(OR)"; } .search-box .special-div::before{ diff --git a/multi.html b/multi.html index ab41be11..58092400 100644 --- a/multi.html +++ b/multi.html @@ -830,124 +830,126 @@ var formation = new Formation(teamsCount,5); -
- - - - - -
- -
-
-
+
+ + + +
+
+
    +
+ +
+
+
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+
+
  • diff --git a/script.js b/script.js index 10113e67..8c53dd70 100644 --- a/script.js +++ b/script.js @@ -2993,7 +2993,7 @@ function initialize() { //const s_rare = s_rareLi.map(li=>li.querySelector(".rare-check")); //checkbox集合 const s_awokensDiv = searchBox.querySelector(".awoken-div"); - const s_awokensUl = s_awokensDiv.querySelector(".all-awokens"); + const s_awokensUl = s_awokensDiv.querySelector(":scope .all-awokens .awoken-ul"); const s_awokensLi = Array.from(s_awokensUl.querySelectorAll(".awoken-count")); const s_awokensIcons = s_awokensLi.map(li => li.querySelector(".awoken-icon")); s_awokensUl.originalSorting = s_awokensIcons.map(icon => parseInt(icon.getAttribute("data-awoken-icon"), 10)); //储存觉醒列表的原始排序 @@ -3015,20 +3015,19 @@ function initialize() { }; s_boxHave.onchange(false); - const s_sawokensDiv = searchBox.querySelector(".sawoken-div"); - const s_sawokensDetail = s_sawokensDiv.querySelector("details"); - const s_sawokensUl = s_sawokensDiv.querySelector(".awoken-ul"); - const s_sawokensLi = Array.from(s_sawokensUl.querySelectorAll(".awoken-count")); - s_sawokensUl.originalSorting = s_sawokensLi.map(li => parseInt(li.querySelector(".awoken-icon").getAttribute("data-awoken-icon"), 10)); + const s_sawokensDetail = searchBox.querySelector(".sawoken-detail"); s_sawokensDetail.open = localStorage_getBoolean(cfgPrefix + 'hide-sawoken'); - s_sawokensDetail.onclick = function(event) { - if (event instanceof MouseEvent) localStorage.setItem(cfgPrefix + 'hide-sawoken', Number(!this.open)); + s_sawokensDetail.querySelector("summary").onclick = function(event) { + if (event instanceof MouseEvent) localStorage.setItem(cfgPrefix + 'hide-sawoken', Number(!s_sawokensDetail.open)); } + const s_sawokensUl = s_sawokensDetail.querySelector(".awoken-ul"); + const s_sawokensLi = Array.from(s_sawokensUl.querySelectorAll(".awoken-count")); + s_sawokensUl.originalSorting = s_sawokensLi.map(li => parseInt(li.querySelector(".awoken-icon").getAttribute("data-awoken-icon"), 10)); const s_sawokens = s_sawokensLi.map(li => li.querySelector(".sawoken-check")); const s_includeSuperAwoken = searchBox.querySelector("#include-super-awoken"); //搜索超觉醒 s_includeSuperAwoken.onchange = function() { - s_sawokensDiv.classList.toggle(className_displayNone, this.checked);; + s_sawokensDetail.classList.toggle(className_displayNone, this.checked);; }; s_includeSuperAwoken.onchange(); @@ -3054,8 +3053,7 @@ function initialize() { sawokenSorting.forEach(appendLi, {iconLis: s_sawokensLi, fragment: fragmentSawoken}); const className = "official-awoken-sorting"; - s_awokensDiv.classList.toggle(className, checked);; - s_sawokensDiv.classList.toggle(className, checked);; + s_awokensDiv.classList.toggle(className, checked); s_awokensUl.appendChild(fragmentAwoken); s_sawokensUl.appendChild(fragmentSawoken); @@ -4721,7 +4719,7 @@ function refreshAll(formationData) { const enableBouns = memberCard.attrs[0] === assistCard.attrs[0] || //如果主属性相等 [memberCard.attrs[0], assistCard.attrs[0]].some(attr=>attr===6); //或任一为仅副属性 teamAbilityLi.classList.toggle("enable-bouns", enableBouns); - + //隐藏队长的自身换为换队长的技能 if (ti == 5 || //好友队长永远隐藏 leaderIdx == 0 && ti == 0 ) //当没换队长时,自身队长的欢队长技能隐藏 diff --git a/service-worker.js b/service-worker.js index 7ad0b225..41e58503 100644 --- a/service-worker.js +++ b/service-worker.js @@ -6843,7 +6843,7 @@ const cachesMap = new Map([ ], [ "browser-compatibility.js", - "12b22e62af685685caf8dc72475353a0" + "cd34f33d1c77c7fff4ae17b448eac5ad" ], [ "index.html", @@ -6851,7 +6851,7 @@ const cachesMap = new Map([ ], [ "multi.html", - "e961af84e5d8e3389ba46056ffc9b563" + "41308c655aac13cd6c68cd445cca84e2" ], [ "script-custom_elements.js", @@ -6871,11 +6871,11 @@ const cachesMap = new Map([ ], [ "script.js", - "0869835436b0f3de8268c43a926ae09a" + "b9b5881643200973f4a5b7669707cc7e" ], [ "solo.html", - "f357b98d831a080884bfd17bbc4d15fb" + "fcb04c0636a26f1b9118fb7e5fcb5b01" ], [ "style-monsterimages.css", @@ -6883,7 +6883,7 @@ const cachesMap = new Map([ ], [ "style.css", - "94f63b477593f60b0454e50a76b33ff0" + "10ab4cd9b74d539bda9f7ade1d05ee39" ], [ "temp.js", @@ -6891,11 +6891,11 @@ const cachesMap = new Map([ ], [ "triple.html", - "236a3197fd055f5c9ecda62a9a499788" + "49dedb29c7c0c869192373316d5ce746" ], [ "languages/en.css", - "d5ed63d0dae6a05ebf220473eaadc56b" + "e9400cd3b11e3e10024ca40baee32525" ], [ "languages/en.js", @@ -6903,7 +6903,7 @@ const cachesMap = new Map([ ], [ "languages/ja.css", - "9abdfde84350c69cfde69f715ec24674" + "8c740efc008311f7e292a07eded08141" ], [ "languages/ja.js", @@ -6911,7 +6911,7 @@ const cachesMap = new Map([ ], [ "languages/ko.css", - "7e59e394673202bd2acf04c3467eff08" + "c54d51440de15a89c2d2b5848a001757" ], [ "languages/ko.js", @@ -6919,7 +6919,7 @@ const cachesMap = new Map([ ], [ "languages/language-list.js", - "ed47a51e8af39f09c5b07af6014d6d6d" + "9378e3d0930a5a841fdfed4b2dead003" ], [ "languages/zh-CN.css", @@ -6931,7 +6931,7 @@ const cachesMap = new Map([ ], [ "languages/zh-TW.css", - "8a888b7951f0dce6c2f55bb638dbeee2" + "c62e83572e466f3cfdaa0d3bb5a99949" ], [ "languages/zh-TW.js", @@ -6939,7 +6939,7 @@ const cachesMap = new Map([ ], [ "languages/zh.css", - "0433e8d7e050408e17e74a5883cab271" + "346ed7d71feb09fe3d1a54bfa030c607" ], [ "languages/zh.js", diff --git a/solo.html b/solo.html index cf9fdcfb..d026c367 100644 --- a/solo.html +++ b/solo.html @@ -672,124 +672,126 @@ var formation = new Formation(teamsCount,6);
-
- - - - - -
- -
-
-
+
+ + + +
+
+
    +
+ +
+
+
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+
+
  • diff --git a/style.css b/style.css index 2301af8c..af51c650 100644 --- a/style.css +++ b/style.css @@ -1559,18 +1559,14 @@ icon.inflicts::after { display: inline-block; } -.types-div .type-list input+label, -.sawoken-div .awoken-ul input+label, -.dialog-dungeon-enchance input[type="checkbox"]+label +:where( + .type-list, + .awoken-ul, + .rare-list, + .attr-list, +) input[type="checkbox"]:not(:checked)+label { opacity: var(--search-icon-unchecked); - cursor: pointer; -} -.types-div .type-list input:checked+label, -.sawoken-div .awoken-ul input:checked+label, -.dialog-dungeon-enchance input[type="checkbox"]:checked+label -{ - opacity: 1; } .types-div .type-and-or-label{ @@ -1682,8 +1678,10 @@ icon.inflicts::after { margin-left: 5px; } - -.search-box .awoken-option .selected-awokens{ +.search-box .selected-awokens-div { + margin-bottom: 5px; +} +.search-box .selected-awokens-div .selected-awokens{ min-height: 32px; box-sizing: border-box; width: calc(100% - 90px); @@ -1691,27 +1689,27 @@ icon.inflicts::after background-color: #00000044; border-radius: 6px; box-shadow: inset black 0 0 3px; - display: inline-block; - vertical-align: top; + display: inline grid; + vertical-align: bottom; + grid-gap: 0; } /*.search-box .awoken-div::before{ content: "觉醒"; }*/ -.search-box .awoken-div, -.search-box .sawoken-div{ - vertical-align: top; -} -.search-box .awoken-div::before{ +.search-box .awoken-div .all-awokens::before { display: none; } -.search-box .awoken-div.official-awoken-sorting::before, -.search-box .sawoken-div.official-awoken-sorting::before -{ +.search-box .awoken-div.official-awoken-sorting :where( + .all-awokens, + .sawoken-detail, +){ display: inline-block; - line-height: 26px; - } -.sawoken-div.official-awoken-sorting { +.search-box .awoken-div.official-awoken-sorting .all-awokens::before +{ + display: block; +} +.official-awoken-sorting .sawoken-detail { margin-left: 10px; } @@ -1720,11 +1718,10 @@ icon.inflicts::after min-width: 80px; background-size: 100px 100px; background-position-y: 40px; - vertical-align: top; font-size: 18px; line-height: 28px; padding: 0; - vertical-align: top; + vertical-align: bottom; } .search-box .rare-clear::before, .search-box .special-add::before, @@ -1813,16 +1810,9 @@ icon.inflicts::after text-align: left; } -.search-box .awoken-div .awoken-icon:not([data-awoken-count]), -.search-box .awoken-div .awoken-icon[data-awoken-count="0"] -{ - opacity: var(--search-icon-unchecked); -} - -.awoken-icon:not([data-awoken-count="0"])::before +.awoken-icon::before { - content: attr(data-awoken-count); - display: inline-block; + display: block; position: absolute; line-height: 18px; font-size: 18px; @@ -1831,9 +1821,19 @@ icon.inflicts::after -webkit-text-stroke: 1px black; text-shadow: black 1px 1px 1px; } -.search-box .awoken-ul .awoken-count.zero{ +.awoken-icon[data-awoken-count]:not([data-awoken-count="0"])::before +{ + content: attr(data-awoken-count); +} + +/*搜索框有数字的觉醒才变亮*/ +.search-box .all-awokens .awoken-icon{ opacity: var(--search-icon-unchecked); } +.search-box .all-awokens .awoken-icon[data-awoken-count]:not([data-awoken-count="0"]){ + opacity: 1; +} + .search-box .awoken-ul .count{ width: 1em; height: auto; @@ -3628,6 +3628,9 @@ table .orb-icon margin-top: 100px; margin-left: calc(50% - 270px); } +.dialog-dungeon-enchance label { + cursor: pointer; +} .dialog-dungeon-enchance .dialog-content>ul>li { display: inline-block; diff --git a/triple.html b/triple.html index 8f2bf4ed..668ccef4 100644 --- a/triple.html +++ b/triple.html @@ -1724,124 +1724,126 @@ var formation = new Formation(teamsCount,6);
-
- - - - - -
- -
-
-
+
+ + + +
+
+
    +
+ +
+
+
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+
+