Skip to content

Commit

Permalink
Update searchJumper.user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hoothin committed Sep 23, 2024
1 parent 411f22b commit 79f612d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion searchJumper.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -8432,6 +8432,7 @@
let self = this;
let list = document.createElement("div");
list.className = "sitelist";
list.style.visibility = "hidden";
let con = document.createElement("div");
con.className = "sitelistCon";
list.appendChild(con);
Expand Down Expand Up @@ -11125,7 +11126,7 @@

let allValue = [];
let calcJson = (json, template) => {
let finalData = data;
let finalData = data, allFailed = true;
while (template) {
let templateArr = template[1].replace(/\\\|/g, "【searchJumperJsonSplit】").split("|");
let props = templateArr[0].replace(/【searchJumperJsonSplit】/g, "|").replace(/\[(\d+)\]/g, ".$1").replace(/\[all\]/g, ".all").split("."), value = json, arrayValue = null;
Expand Down Expand Up @@ -11197,10 +11198,14 @@
}
}
if (!value) value = "";
else allFailed = false;
allValue.push(value);
finalData = finalData.replace(template[0], value);
template = finalData.match(/{(.*?)}/);
}
if (allFailed) {
console.log("Error:", json);
}
finalData = finalData.replace(/showTipsLeftBrace/g, "{").replace(/showTipsRightBrace/g, "}");
return finalData;
}
Expand Down

0 comments on commit 79f612d

Please sign in to comment.