Skip to content

Commit 1ff018c

Browse files
committed
fix: gaze index error
1 parent 9abcf02 commit 1ff018c

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

Diff for: js/gaze.js

+2-12
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,7 @@ class Go {
236236
}
237237
_makeFuncWrapper(funcId) {
238238
const self = this;
239-
console.log("正在绑定函数id:", funcId);
240239
return function () {
241-
console.log("执行函数id:", funcId);
242-
console.log("函数参数:", Array.from(arguments));
243240
const event = {
244241
id: funcId,
245242
this: this,
@@ -248,7 +245,6 @@ class Go {
248245
self._pendingEvent = event;
249246
self._resume();
250247
const result = event.result;
251-
console.log("函数结果:", result);
252248
return result;
253249
};
254250
}
@@ -319,11 +315,8 @@ const decryptor = (() => {
319315
return bytesToString(result);
320316
};
321317
const decryptStream = async (data, mid, key, url) => {
322-
const indexMa = url.split('/').at(-1);
323-
if (!indexMa) return url;
324-
const index = indexMa[1];
325-
const istr = `${index}+gazes_v-@_info`;
326-
console.log(istr);
318+
if (!url.includes("gazes_v-@_info")) return url;
319+
const istr = url.split("/").at(-1);
327320
const ungzipped = pako.ungzip(data, {
328321
to: "string",
329322
});
@@ -581,21 +574,18 @@ var rule = {
581574
const resp = await axios.get(`${this.host}/filter`, {
582575
headers: this.headers,
583576
});
584-
585577
// cookie 处理
586578
const headers = resp.headers;
587579
const cookies = headers["set-cookie"];
588580
const cookie = cookies.map((item) => item.split(";")[0]).join("; ");
589581
this.headers.Cookie = cookie;
590-
591582
// 请求头处理
592583
const html = resp.data;
593584
const kv_macth = html.match(/'headers':({[^{}]*})/)[1];
594585
const kv_headers = new Function(`return ${kv_macth}`)();
595586
for (const key in kv_headers) {
596587
this.headers[key] = kv_headers[key];
597588
}
598-
599589
console.warn("headers", this.headers);
600590
},
601591
};

0 commit comments

Comments
 (0)