diff --git a/background.js b/background.js new file mode 100644 index 0000000..4cc32a3 --- /dev/null +++ b/background.js @@ -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 + }); + } +}); diff --git a/manifest.json b/manifest.json index 533c736..aa80ec3 100644 --- a/manifest.json +++ b/manifest.json @@ -1,13 +1,24 @@ { "manifest_version": 3, "name": "渠道应用开发部知识库", - "version": "0.6", + "version": "1.0.1", "description": "通过关键词快速搜索内部文档", "permissions": [], "host_permissions": [ "http://app.wisdompulse.cn/*", "http://share.wisdompulse.cn/*" ], + "background": { + "service_worker": "background.js" + }, + "commands": { + "open_plugin": { + "suggested_key": { + "default": "Alt+K" + }, + "description": "打开渠道应用开发部知识库插件" + } + }, "action": { "default_popup": "popup.html", "default_icon": {