From 5868316c3a6daeb566c251341fe481b1adbd5f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E9=9C=96=E9=93=83?= Date: Wed, 20 May 2026 21:03:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8F=B3=E9=94=AE?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E8=B7=B3=E8=BD=AC=E7=9B=AE=E6=A0=87=E4=B8=BA?= =?UTF-8?q?=20popup=20=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 fallback 页面从 options.html 改为 popup.html - popup 页面使用 RouterProvider,可以正确处理 URL 参数并跳转到对应功能页面 - options 页面是独立设置页,不支持 URL 参数路由 --- entrypoints/background.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoints/background.ts b/entrypoints/background.ts index d1b15f6..48238e4 100644 --- a/entrypoints/background.ts +++ b/entrypoints/background.ts @@ -32,9 +32,9 @@ export default defineBackground(() => { // sidepanel 未打开或无法通信,继续执行其他方案 } - const optionsUrl = chrome.runtime.getURL('/options.html'); + const popupUrl = chrome.runtime.getURL('/popup.html'); const params = new URLSearchParams({ feature: featureKey, payload }); - await browser.tabs.create({ url: `${optionsUrl}?${params.toString()}` }); + await browser.tabs.create({ url: `${popupUrl}?${params.toString()}` }); }); // 监听扩展图标点击事件,打开侧边栏