diff --git a/script.js b/script.js index 6382d083..05932cae 100644 --- a/script.js +++ b/script.js @@ -1382,9 +1382,16 @@ Formation.prototype.getSanbonV2Script = function() const [members,assists,badge] = this.teams[0]; const scriptLines = [`(async ()=>{ "use strict"; - const __NEXT_DATA__ = document.getElementById("__NEXT_DATA__"); - const __NEXT_DATA__JSON = JSON.parse(__NEXT_DATA__.innerHTML); - const buildId = __NEXT_DATA__JSON.buildId; + let buildId; + if (typeof __NEXT_DATA__ !== 'undefined') { + buildId = __NEXT_DATA__?.buildId; + } else { + const Zstr = window.__next_f.find(o=>o?.[1]?.startsWith("0:"))[1]; + const regRes = /"buildId":"([\\w\\-]+)"/ig.exec(Zstr); + buildId = regRes[1]; + } + if (!buildId) throw Error("buildId not found."); + const region = "${region}"; async function fetchFlattened(id) { diff --git a/service-worker.js b/service-worker.js index 7617a9cc..2492fd0f 100644 --- a/service-worker.js +++ b/service-worker.js @@ -29191,7 +29191,7 @@ const cachesMap = new Map([ ], [ "script.js", - "5ccf991a960d65a22dafaecdb56ffdce" + "e404ffcfe61737efab3476ec7da3ceef" ], [ "solo.html",