新增快捷键唤起

This commit is contained in:
luke 2025-05-24 17:04:04 +08:00
parent 150621b11b
commit 8e8df8897c
2 changed files with 22 additions and 1 deletions

10
background.js Normal file
View File

@ -0,0 +1,10 @@
chrome.commands.onCommand.addListener(function (command) {
if (command === "open_plugin") {
chrome.windows.create({
url: "popup.html",
type: "popup",
width: 640,
height: 800
});
}
});

View File

@ -1,13 +1,24 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "渠道应用开发部知识库", "name": "渠道应用开发部知识库",
"version": "0.6", "version": "1.0.1",
"description": "通过关键词快速搜索内部文档", "description": "通过关键词快速搜索内部文档",
"permissions": [], "permissions": [],
"host_permissions": [ "host_permissions": [
"http://app.wisdompulse.cn/*", "http://app.wisdompulse.cn/*",
"http://share.wisdompulse.cn/*" "http://share.wisdompulse.cn/*"
], ],
"background": {
"service_worker": "background.js"
},
"commands": {
"open_plugin": {
"suggested_key": {
"default": "Alt+K"
},
"description": "打开渠道应用开发部知识库插件"
}
},
"action": { "action": {
"default_popup": "popup.html", "default_popup": "popup.html",
"default_icon": { "default_icon": {