Skip to content

Commit c279f68

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sources/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ 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 ([',inventoryId:', ':if("#adshield"===', ':_.ADS_FRAME,'].some(Item => FunctionText.includes(Item))) {
26+
if ([',inventoryId:', ':if("#adshield"===', ':_.ADS_FRAME,', '[new ad(this,'].some(Item => FunctionText.includes(Item))) {
27+
console.debug('[tinyShield]:', FunctionText, Args)
2728
throw new Error()
2829
}
2930
return Reflect.apply(Target, ThisArg, Args)

0 commit comments

Comments
 (0)