diff --git a/.gitignore b/.gitignore index 1b938a6..f80b818 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ hs_err_pid* replay_pid* +.idea \ No newline at end of file diff --git a/target/classes/static/index.html b/target/classes/static/index.html index d36429a..a606702 100644 --- a/target/classes/static/index.html +++ b/target/classes/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