fix: 修复右键菜单跳转到错误页面的问题

- 将 options 页面路径从 '/entrypoints/options/index.html' 修正为 '/options.html'
- WXT 构建后 entrypoints/options/index.html 会输出为根目录的 options.html
This commit is contained in:
雨霖铃
2026-05-20 21:00:11 +08:00
parent c1890960ea
commit 8ec584c85f
+1 -1
View File
@@ -32,7 +32,7 @@ export default defineBackground(() => {
// sidepanel 未打开或无法通信,继续执行其他方案 // sidepanel 未打开或无法通信,继续执行其他方案
} }
const optionsUrl = chrome.runtime.getURL('/entrypoints/options/index.html'); const optionsUrl = chrome.runtime.getURL('/options.html');
const params = new URLSearchParams({ feature: featureKey, payload }); const params = new URLSearchParams({ feature: featureKey, payload });
await browser.tabs.create({ url: `${optionsUrl}?${params.toString()}` }); await browser.tabs.create({ url: `${optionsUrl}?${params.toString()}` });
}); });