feat(Manifest, Background): add action configuration for extension icon and click behavior

This commit is contained in:
Astrian Zheng 2025-05-28 13:17:02 +10:00
parent 4c85a037fa
commit e03741a0f8
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA
2 changed files with 12 additions and 0 deletions

View File

@ -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') })
})

View File

@ -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"
},