From 844164d95d7ceb7726bdf189f29dd9c1cfa812af Mon Sep 17 00:00:00 2001 From: Mystikfluu Date: Sun, 10 Jul 2022 13:40:05 +0200 Subject: [PATCH] enhanced reply style --- js/posts.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/js/posts.js b/js/posts.js index 3135098..2553a68 100644 --- a/js/posts.js +++ b/js/posts.js @@ -125,11 +125,16 @@ async function createPost(username,text,time,specialtext,postid,isbot,reply_id) replyAvatar.classList.add("avatar") replyAvatar.src = await getavatar(reply_username) - replyDiv.appendChild(replyAvatar) - replyDiv.appendChild(reply_username_text) - replyDiv.appendChild(spacerTextNode()) - replyDiv.innerHTML += filterPost(reply_text) - replyDiv.appendChild(replyBr) + replyA.href = "#"+reply_id + + replyA.appendChild(replyAvatar) + replyA.appendChild(reply_username_text) + replyA.appendChild(spacerTextNode()) + replyA.innerHTML += filterPost(reply_text.replace("\n"," ").substring(0,20)) + replyA.appendChild(replyBr) + + replyDiv.appendChild(replyA) + newDiv.appendChild(replyDiv) } catch (ignored) {} }