From 0948b1eeb7f06be82907bce7df0d83f5c1e7f014 Mon Sep 17 00:00:00 2001 From: jimlee Date: Thu, 30 Mar 2023 14:18:29 +0800 Subject: [PATCH] =?UTF-8?q?:ok:=20=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=9B=BE=E7=89=87=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/index.html | 5 ++++- upload.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index d36429a..a606702 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -240,6 +240,9 @@ } function saveValue() { + if (textarea.innerHTML === "") { + return + } let href = "" for (element of textarea.childNodes) { if (href === "" && element.href !== undefined && element.href !== "") { @@ -251,7 +254,7 @@ if (href !== "") { nowValue = href; } else { - nowValue = textarea.innerText + nowValue = textarea.innerText === "" ? textarea.innerHTML : textarea.innerText } if (lastValue !== nowValue && lastUpdate != null && Date.now() - lastUpdate > 3000) { lastValue = nowValue diff --git a/upload.sh b/upload.sh index 7d49009..d08ee77 100644 --- a/upload.sh +++ b/upload.sh @@ -1,2 +1,2 @@ mvn clean package -DskipTests=true -scp target/temp-clipboard-1.0-SNAPSHOT-executable.jar root@iloli.vip:~/clipboard/ \ No newline at end of file +scp -P4422 target/temp-clipboard-1.0-SNAPSHOT-executable.jar jimlee@2ha.me:~/services/clipboard/ \ No newline at end of file