Skip to content

Commit 8a4e532

Browse files
committed
fix: catch a Promise related to Ad-Shield with more keyword
1 parent 7bf05c9 commit 8a4e532

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@list-kr/tinyshield",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"description": "",
55
"type": "module",
66
"scripts": {

sources/banner.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// @downloadURL https://cdn.jsdelivr.net/npm/@list-kr/tinyshield@latest/dist/tinyShield.user.js
99
// @license MIT
1010
//
11-
// @version 1.0.8
11+
// @version 1.0.9
1212
// @author PiQuark6046 and contributors
1313
//
1414
// @match https://ygosu.com/*

sources/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ Win.Function.prototype.apply = new Proxy(Win.Function.prototype.apply, {
2323
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
2424
apply(Target: typeof Function.prototype.apply, ThisArg: Function, Args: unknown[]) {
2525
let FunctionText = OrignalFunctionToString.call(ThisArg) as string
26-
if (FunctionText.includes(',inventoryId:') || FunctionText.includes(':if("#adshield"===')) {
26+
if ([',inventoryId:', ':if("#adshield"===', ':_.ADS_FRAME,'].some(Item => FunctionText.includes(Item))) {
2727
throw new Error()
2828
}
29-
3029
return Reflect.apply(Target, ThisArg, Args)
3130
}
3231
})

0 commit comments

Comments
 (0)