@@ -22,7 +22,7 @@ import { popupClient, requestOpenBatchUpdatePage } from "@App/pages/store/featur
2222import type { ScriptMenu , TPopupScript } from "@App/app/service/service_worker/types" ;
2323import { systemConfig } from "@App/pages/store/global" ;
2424import { isChineseUser , localePath } from "@App/locales/locales" ;
25- import { getCurrentTab } from "@App/pkg/utils/utils" ;
25+ import { getCurrentTab , openInCurrentTab } from "@App/pkg/utils/utils" ;
2626import { subscribeMessage } from "@App/pages/store/global" ;
2727import type { TDeleteScript , TEnableScript , TScriptRunStatus } from "@App/app/service/queue" ;
2828import { SCRIPT_RUN_STATUS_RUNNING } from "@App/app/repo/scripts" ;
@@ -309,8 +309,9 @@ function App() {
309309 systemConfig . setEnableScript ( val ) ;
310310 } ,
311311 handleSettingsClick : ( ) => {
312- // 使用 window.open 而非 <a> 连结:避免 Vivaldi 等浏览器偶发崩溃
313- window . open ( "/src/options.html" , "_blank" ) ;
312+ // 经由扩展 API 打开(而非 window.open / <a>):既避免 Vivaldi 偶发崩溃,
313+ // 也兼容 Edge Android —— 移动端 window.open 打不开 chrome-extension:// 内部页(#686)
314+ openInCurrentTab ( "/src/options.html" ) ;
314315 } ,
315316 handleNotificationClick : ( ) => {
316317 setShowAlert ( ( prev ) => ! prev ) ;
@@ -341,7 +342,7 @@ function App() {
341342 await chrome . storage . local . set ( {
342343 activeTabUrl : { url : currentUrl } ,
343344 } ) ;
344- window . open ( "/src/options.html#/script/editor?target=initial" , "_blank ") ;
345+ await openInCurrentTab ( "/src/options.html#/script/editor?target=initial" ) ;
345346 break ;
346347 case "checkUpdate" :
347348 requestOpenBatchUpdatePage ( getUrlDomain ( currentUrl ) ) ;
0 commit comments