From deec1e77a50515ddcc26ce652545a6624a21b8a2 Mon Sep 17 00:00:00 2001 From: lmm214 Date: Thu, 9 Mar 2023 23:25:08 +0800 Subject: [PATCH] =?UTF-8?q?2023.03.09=20=E6=96=B0=E5=A2=9E=E5=8F=B3?= =?UTF-8?q?=E9=94=AE=E5=8F=91=E9=80=81=E6=96=87=E6=9C=AC=E8=87=B3=20Memos?= =?UTF-8?q?=20=E8=BE=93=E5=85=A5=E6=A1=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ js/background.js | 13 +++++++++++++ manifest.json | 5 ++++- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 js/background.js diff --git a/README.md b/README.md index 6b1d13c..a4459e4 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ Chrome 应用商店: { + chrome.contextMenus.create( + { + type: 'normal', + title: '发送 “%s” 至 Memos ', + id: 'Memos-send', + contexts: ['all'] + }, + ) + }) + chrome.contextMenus.onClicked.addListener(info => { + chrome.storage.sync.set({open_action: "save_text",open_content:info.selectionText}); + }) \ No newline at end of file diff --git a/manifest.json b/manifest.json index 9c5b4cb..cbb3a9f 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "__MSG_extName__", - "version": "2023.03.05", + "version": "2023.03.09", "action": { "default_popup": "popup.html", "default_icon": "assets/logo_24x24.png", @@ -15,6 +15,9 @@ "16": "assets/logo.png", "48": "assets/logo.png" }, + "background": { + "service_worker": "js/background.js" + }, "permissions": [ "tabs", "storage",