feat(Manifest, Background): add action configuration for extension icon and click behavior
This commit is contained in:
parent
4c85a037fa
commit
e03741a0f8
|
@ -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') })
|
||||
})
|
|
@ -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"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user