From 090ca86f3e7d811147af3ad8ed2c25a9d9b64be6 Mon Sep 17 00:00:00 2001 From: CatAClock Date: Sun, 20 Jul 2025 18:44:01 -0700 Subject: [PATCH] Better way of checking tags --- src/HTTP/JS/post.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/HTTP/JS/post.js b/src/HTTP/JS/post.js index 74df905..2c31315 100644 --- a/src/HTTP/JS/post.js +++ b/src/HTTP/JS/post.js @@ -36,17 +36,17 @@ async function Post() { // Adding tags let TempText = Text; let Tags = TagsInputArea.value.split(";"); - if (Tags.length >= 1) { + if (Tags[0] != "") { TempText += "

"; - } - for (let i of Tags) { - while (i[0] == " ") { - i = i.substring(1, i.length); + for (let i of Tags) { + while (i[0] == " ") { + i = i.substring(1, i.length); + } + if (i[0] != "#" && i.length != 0) { + i = "#" + i; + } + TempText += i + " "; } - if (i[0] != "#" && i.length != 0) { - i = "#" + i; - } - TempText += i + " "; } switch(Visible) { case "Public":