Browse Source

保留自定义附加显示内容

tags/v24.6
枫谷剑仙 3 years ago
parent
commit
473cfa9a68
3 changed files with 19 additions and 2 deletions
  1. +12
    -0
      script-json_data.js
  2. +5
    -0
      script.js
  3. +2
    -2
      service-worker.js

+ 12
- 0
script-json_data.js View File

@@ -3546,6 +3546,18 @@ const specialSearchFunctions = (function() {
{name:"All Latent TAMADRA",otLangName:{chs:"所有潜觉蛋龙",cht:"所有潛覺蛋龍"},
function:cards=>cards.filter(card=>card.latentAwakeningId>0).sort((a,b)=>a.latentAwakeningId-b.latentAwakeningId)
},
{name:"Original Name",otLangName:{chs:"怪物原始名称",cht:"怪物原始名稱"},
function:cards=>cards,
addition:card=>card.name
},
{name:"Feed EXP",otLangName:{chs:"合成经验值",cht:"合成經驗值"},
function:cards=>cards.filter(card=>card.feedExp > 0).sort((a,b)=>a.feedExp * a.maxLevel - b.feedExp * b.maxLevel),
addition:card=>`EXP ${Math.round(card.feedExp * card.maxLevel / 4).bigNumberToString()}`
},
{name:"Sell Price",otLangName:{chs:"售卖金钱",cht:"售賣金錢"},
function:cards=>cards.filter(card=>card.sellPrice > 0).sort((a,b)=>a.sellPrice * a.maxLevel - b.sellPrice * b.maxLevel),
addition:card=>`Coin ${Math.round(card.sellPrice * card.maxLevel / 10).bigNumberToString()}`
},
]},
];
return functions;

+ 5
- 0
script.js View File

@@ -3057,6 +3057,7 @@ function initialize(event) {
}
//specialAdd.onclick(); //先运行一次产生两个
specialClear.onclick = function() {
searchMonList.customAddition = null;
specialFilterUl.innerHTML = "";
specialFilterUl.appendChild(specialFilterFirstLi);
specialFirstSelect.selectedIndex = 0;
@@ -3123,6 +3124,10 @@ function initialize(event) {
} else {
return; //如果不是数组就直接取消下一步
}
//如果之前打开了附加显示,继续沿用
if (customAdditionalFunction === undefined && searchMonList?.customAddition?.length) {
customAdditionalFunction = searchMonList.customAddition;
}

searchBox.classList.remove(className_displayNone);
editBox.show();


+ 2
- 2
service-worker.js View File

@@ -5975,7 +5975,7 @@ const cachesMap = new Map([
],
[
"script-json_data.js",
"b681e04e674e774c6202a3f513a22e07"
"b5a0df3160f45cc7475dcf20d7743246"
],
[
"script-skill-parser.js",
@@ -5987,7 +5987,7 @@ const cachesMap = new Map([
],
[
"script.js",
"44bf4a087298ebcaf2d1e2e8f5252cdd"
"bcab71ce2bed3dd36c841f2cdbd86edf"
],
[
"solo.html",


Loading…
Cancel
Save