diff --git a/README.md b/README.md index f6e127e..2a1735e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## 更新日志 +2022.11.15 新增插入文件图片按钮。 + 2022.11.13 新增插入 todo 按钮。 2022.11.8 支持拖拽上传附件(一个个传)。 diff --git a/css/main.css b/css/main.css index 8ed71bc..5d11592 100644 --- a/css/main.css +++ b/css/main.css @@ -105,16 +105,13 @@ input.inputer{border-bottom: 1px solid #ccc;width:75%;} cursor: not-allowed; } -svg.icon{width:24px;height:24px;} +.common-tools-container .mr-5{margin-right: .5rem;} +.common-tools-container svg.icon,#blog_info_edit svg.icon{width:24px;height:24px;opacity: 0.6;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;} +#tags:hover svg,#getlink:hover svg,#locked:hover svg,#unlock:hover svg,#newtodo:hover svg,#upres:hover svg{opacity: 1;} -#locked{display: none;} - -#taglist,#visibilitylist{display: none;} +#locked,#taglist,#visibilitylist{display: none;} .tag-list,.visibility-list { margin-top: .5rem; max-height: 13rem; diff --git a/js/oper.js b/js/oper.js index aa2fb37..8a9852d 100644 --- a/js/oper.js +++ b/js/oper.js @@ -241,6 +241,20 @@ $('#getlink').click(function () { }) }) +$('#upres').click(async function () { + $('#inFile').click() +}) + +$('#inFile').on('change', function(data){ + var fileVal = $('#inFile').val(); + var file = null + if(fileVal == '') { + return; + } + file= this.files[0]; + uploadImage(file) +}); + function add(str) { var tc = document.getElementById("content"); var tclen = tc.value.length; diff --git a/manifest.json b/manifest.json index f96192f..f287048 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "__MSG_extName__", - "version": "2022.11.13", + "version": "2022.11.15", "action": { "default_popup": "popup.html", "default_icon": "assets/logo_24x24.png", diff --git a/popup.html b/popup.html index 4848d1a..3da6949 100644 --- a/popup.html +++ b/popup.html @@ -43,32 +43,38 @@