Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit ffbd535

Browse files
committed
fix: Safari detection issue using try...catch trap at dogdrip.net
1 parent 3721a0a commit ffbd535

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-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/microshield",
3-
"version": "4.12.3",
3+
"version": "4.12.4",
44
"description": "",
55
"type": "module",
66
"scripts": {

sources/banner-ios-blocker.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/microshield@latest/dist/microShield-ios-blocker.user.js
99
// @license Apache-2.0
1010
//
11-
// @version 4.12.3
11+
// @version 4.12.4
1212
// @author PiQuark6046 and contributors
1313
//
1414
// @match *://ygosu.com/*

sources/banner-ios-recovery.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/microshield@latest/dist/microShield-ios-recovery.user.js
99
// @license Apache-2.0
1010
//
11-
// @version 4.12.3
11+
// @version 4.12.4
1212
// @author PiQuark6046 and contributors
1313
//
1414
// @match *://ygosu.com/*

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/microshield@latest/dist/microShield.user.js
99
// @license Apache-2.0
1010
//
11-
// @version 4.12.3
11+
// @version 4.12.4
1212
// @author PiQuark6046 and contributors
1313
//
1414
// @match *://ygosu.com/*

sources/src/utils/secret.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ export const ProtectFunction = <F extends Fomulate>(F: F, Options: ProtectedFunc
5151
} else if (typeof Options.ReturnAs !== 'undefined' &&
5252
MatchSpecificSeq(ErrorStackParser.parse(ErrorInstance), [/[A-Za-z]{1,3}/, /\/</, /[A-Za-z]{1,3}/, /\/</, /\/</])) {
5353
ReturnAs = Options.ReturnAs
54+
} else if (typeof Options.ReturnAs !== 'undefined' &&
55+
MatchSpecificSeq(ErrorStackParser.parse(ErrorInstance), [/[A-Za-z]{1,3}/, undefined, /[A-Za-z]{1,3}/, /Promise/, /construct/])) {
56+
ReturnAs = Options.ReturnAs
5457
} else {
5558
ReturnAs = 'Banned'
5659
}
@@ -63,6 +66,9 @@ export const ProtectFunction = <F extends Fomulate>(F: F, Options: ProtectedFunc
6366
if (IsAdShieldCall()) {
6467
E()
6568
}
69+
if (Options.Name && Options.Name.startsWith('remove') && MatchSpecificSeq(ErrorStackParser.parse(ErrorInstance), [undefined, /forEach/, /[A-Za-z]{1,3}/, /[A-Za-z]{1,3}/, /[A-Za-z]{1,3}/])) {
70+
E()
71+
}
6672

6773
if (StackTraces.some(StackTrace => JSON.stringify(ErrorStackParser.parse(ErrorInstance)) === JSON.stringify(StackTrace))) {
6874
E()

0 commit comments

Comments
 (0)