Skip to content

Commit

Permalink
2023.03.09 新增右键发送文本至 Memos 输入框。
Browse files Browse the repository at this point in the history
  • Loading branch information
lmm214 committed Mar 9, 2023
1 parent e740545 commit deec1e7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Chrome 应用商店:<https://chrome.google.com/webstore/detail/memos-bber/cbhj

## 更新日志

2023.03.09 新增右键发送文本至 Memos 输入框。

![iShot_2023-03-05](https://user-images.githubusercontent.com/1472390/222957393-fc2e933e-b18f-4e69-a8c0-4609f84a0a90.png)

2023.03.05 新增指定标签“仅自己可见”或“所有人可见”;图片上传文件名添加时间戳。
Expand Down
13 changes: 13 additions & 0 deletions js/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
chrome.runtime.onInstalled.addListener(() => {
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});
})
5 changes: 4 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -15,6 +15,9 @@
"16": "assets/logo.png",
"48": "assets/logo.png"
},
"background": {
"service_worker": "js/background.js"
},
"permissions": [
"tabs",
"storage",
Expand Down

0 comments on commit deec1e7

Please sign in to comment.