Skip to content

Commit 3e5bb4c

Browse files
committed
fix: Maximum call stack size exceeded at picrew.me
1 parent 14d53fa commit 3e5bb4c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
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.6",
3+
"version": "1.0.7",
44
"description": "",
55
"type": "module",
66
"scripts": {

sources/banner.txt

Lines changed: 3 additions & 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.6
11+
// @version 1.0.7
1212
// @author PiQuark6046 and contributors
1313
//
1414
// @match https://ygosu.com/*
@@ -251,6 +251,8 @@
251251
// @match https://*.netzwelt.de/*
252252
// @match https://convertcase.net/*
253253
// @match https://*.convertcase.net/*
254+
// @match https://picrew.me/*
255+
// @match https://*.picrew.me/*
254256
//
255257
// @description tinyShield allows AdGuard, uBlock Origin, Brave and ABP to resist against Ad-Shield quickly.
256258
// @description:ko tinyShield는 AdGuard, uBlock Origin, Brave 와 ABP가 애드쉴드에 빠르게 저항할 수 있도록 합니다.

sources/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ declare const unsafeWindow: unsafeWindow
44

55
const Win = typeof unsafeWindow !== 'undefined' ? unsafeWindow : window
66

7+
const OrignalFunctionToString = Win.Function.prototype.toString
8+
79
const ProtectedFunctionStrings = ['toString', 'apply']
810

911
Win.Function.prototype.toString = new Proxy(Win.Function.prototype.toString, {
@@ -20,7 +22,7 @@ Win.Function.prototype.toString = new Proxy(Win.Function.prototype.toString, {
2022
Win.Function.prototype.apply = new Proxy(Win.Function.prototype.apply, {
2123
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
2224
apply(Target: typeof Function.prototype.apply, ThisArg: Function, Args: unknown[]) {
23-
if (ThisArg.toString().includes(',inventoryId:')) {
25+
if (OrignalFunctionToString.call(ThisArg).includes(',inventoryId:')) {
2426
throw new Error()
2527
}
2628

0 commit comments

Comments
 (0)