From af5eb41b64f9e72a753b906e86d6efe58c8063eb Mon Sep 17 00:00:00 2001 From: lmm214 Date: Sun, 13 Nov 2022 21:13:47 +0800 Subject: [PATCH] =?UTF-8?q?newtodo=20=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/main.css | 8 +++++--- js/oper.js | 7 ++++++- manifest.json | 7 ++++++- popup.html | 40 +++++++++++++++++++++++++++++++++++----- 4 files changed, 52 insertions(+), 10 deletions(-) diff --git a/css/main.css b/css/main.css index 3ae7242..8ed71bc 100644 --- a/css/main.css +++ b/css/main.css @@ -106,9 +106,11 @@ input.inputer{border-bottom: 1px solid #ccc;width:75%;} } svg.icon{width:24px;height:24px;} -#tags,#getlink{margin-right: .5rem;} -#tags svg,#getlink svg,#locked svg,#unlock svg{opacity: 0.6;} -#tags:hover svg,#getlink:hover svg,#locked:hover svg,#unlock:hover svg{opacity: 1;cursor: pointer;} +#newtodo svg.icon{padding-top: 2px;} +#tags svg.icon{padding: 2px;width:23px;height:23px;} +#tags,#getlink,#newtodo{margin-right: .5rem;} +#tags svg,#getlink svg,#locked svg,#unlock svg,#newtodo svg{opacity: 0.6;} +#tags:hover svg,#getlink:hover svg,#locked:hover svg,#unlock:hover svg,#newtodo:hover svg{opacity: 1;cursor: pointer;} #locked{display: none;} diff --git a/js/oper.js b/js/oper.js index f0d2e35..aa2fb37 100644 --- a/js/oper.js +++ b/js/oper.js @@ -225,6 +225,11 @@ $(document).on("click",".item-container",function () { add(tagHtml); }) +$('#newtodo').click(function () { + var tagHtml = "\n- [ ] " + add(tagHtml); +}) + $('#getlink').click(function () { chrome.tabs.query({ active: true, currentWindow: true }, ([tab]) => { var linkHtml = " ["+tab.title+"]("+tab.url+") " @@ -330,7 +335,7 @@ function sendText() { { open_action: '', open_content: '',resourceIdList:'' }, function () { $.message({ - message: '网络问题,发送失败!😭' + message: '网络问题,发送失败!😭(记得点下小锁图标,设置一下状态哦)' }) } )}, diff --git a/manifest.json b/manifest.json index 0e14831..271873e 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,12 @@ "16": "assets/logo.png", "48": "assets/logo.png" }, - "permissions": ["tabs","storage","activeTab"], + "permissions": [ + "tabs", + "storage", + "activeTab", + "contextMenus" + ], "host_permissions": ["http://*/*", "https://*/*"], "commands": { "_execute_browser_action": { diff --git a/popup.html b/popup.html index 0a7b458..4848d1a 100644 --- a/popup.html +++ b/popup.html @@ -12,7 +12,10 @@
MEMOS
-
+
+ + +
-
- -
-
+
+ + + + + +
+
+ + + + +
+ +
+ + + + +
+
+ + + + +