diff --git a/public/background.js b/public/background.js index 4bb49c7..6c6f25c 100644 --- a/public/background.js +++ b/public/background.js @@ -23,3 +23,7 @@ chrome.webRequest.onBeforeRequest.addListener( }, { urls: ['https://monster-siren.hypergryph.com/manifest.json'] }, ) + +chrome.action.onClicked.addListener(() => { + chrome.tabs.create({ url: chrome.runtime.getURL('index.html') }) +}) \ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json index af0e735..b69b538 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -25,6 +25,14 @@ "48": "vite.svg", "128": "vite.svg" }, + "action": { + "default_title": "打开 MSR Mod", + "default_icon": { + "16": "vite.svg", + "48": "vite.svg", + "128": "vite.svg" + } + }, "background": { "service_worker": "background.js" },