Skip to content

Commit 6c308f6

Browse files
committed
🐛 修复与隐身窗口检查权限冲突导致反复重启的问题
1 parent 7214544 commit 6c308f6

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ tailwind.config.js
3333
package-lock.json
3434
yarn.lock
3535

36-
.claude/settings.local.json
36+
.claude
37+
38+
CLAUDE.md

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "__MSG_scriptcat__",
4-
"version": "1.3.0.1500",
4+
"version": "1.3.0",
55
"author": "CodFrm",
66
"description": "__MSG_scriptcat_description__",
77
"options_ui": {

src/pkg/utils/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ export function errorMsg(e: any): string {
194194

195195
// 预计报错有机会在异步Promise里发生,不一定是 chrome.userScripts.getScripts
196196
export async function checkUserScriptsAvailable() {
197+
if (chrome.extension.inIncognitoContext) {
198+
// 隐身模式不检查 API 可用性,避免冲突
199+
return true;
200+
}
197201
try {
198202
// Property access which throws if developer mode is not enabled.
199203
// Method call which throws if API permission or toggle is not enabled.

0 commit comments

Comments
 (0)