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

Commit

Permalink
fix: Safari detection issue using try...catch trap in production
Browse files Browse the repository at this point in the history
  • Loading branch information
piquark6046 committed Nov 6, 2024
1 parent 667fd12 commit 97ead91
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@list-kr/microshield",
"version": "4.12.7",
"version": "4.12.8",
"description": "",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion sources/banner-ios-blocker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// @downloadURL https://cdn.jsdelivr.net/npm/@list-kr/microshield@latest/dist/microShield-ios-blocker.user.js
// @license Apache-2.0
//
// @version 4.12.7
// @version 4.12.8
// @author PiQuark6046 and contributors
//
// @match *://ygosu.com/*
Expand Down
2 changes: 1 addition & 1 deletion sources/banner-ios-recovery.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// @downloadURL https://cdn.jsdelivr.net/npm/@list-kr/microshield@latest/dist/microShield-ios-recovery.user.js
// @license Apache-2.0
//
// @version 4.12.7
// @version 4.12.8
// @author PiQuark6046 and contributors
//
// @match *://ygosu.com/*
Expand Down
2 changes: 1 addition & 1 deletion sources/banner.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// @downloadURL https://cdn.jsdelivr.net/npm/@list-kr/microshield@latest/dist/microShield.user.js
// @license Apache-2.0
//
// @version 4.12.7
// @version 4.12.8
// @author PiQuark6046 and contributors
//
// @match *://ygosu.com/*
Expand Down
5 changes: 1 addition & 4 deletions sources/src/utils/secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,11 @@ export const ProtectFunction = <F extends Fomulate>(F: F, Options: ProtectedFunc
PprintCall(Options.Name, true, ArgArray)

if (typeof Options.ReturnAs !== 'undefined' &&
MatchSpecificSeq(ErrorStackParser.parse(ErrorInstance), [/[A-Za-z]{1,3}/, undefined, /[A-Za-z]{1,3}/, /Generator\./, /Generator\./])) {
MatchSpecificSeq(ErrorStackParser.parse(ErrorInstance), [/[A-Za-z]{1,3}/, undefined, /[A-Za-z]{1,3}/])) {
ReturnAs = Options.ReturnAs
} else if (typeof Options.ReturnAs !== 'undefined' &&
MatchSpecificSeq(ErrorStackParser.parse(ErrorInstance), [/[A-Za-z]{1,3}/, /\/</, /[A-Za-z]{1,3}/, /\/</, /\/</])) {
ReturnAs = Options.ReturnAs
} else if (typeof Options.ReturnAs !== 'undefined' &&
MatchSpecificSeq(ErrorStackParser.parse(ErrorInstance), [/[A-Za-z]{1,3}/, undefined, /[A-Za-z]{1,3}/, /Promise/, /construct/])) {
ReturnAs = Options.ReturnAs
} else {
ReturnAs = 'Banned'
}
Expand Down

0 comments on commit 97ead91

Please sign in to comment.