From 7b1e636187ad8c3418a831f178e6945ee00ae299 Mon Sep 17 00:00:00 2001 From: ffqq Date: Thu, 13 Jul 2023 03:22:47 +0000 Subject: [PATCH] feat: hide image links from messages and improve overall handling of links --- static/js/chat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/chat.js b/static/js/chat.js index 92116c2..1c7194e 100644 --- a/static/js/chat.js +++ b/static/js/chat.js @@ -20,8 +20,8 @@ async function updateMessages(id) { const timeParagraph = document.createElement("p"); const { creator, content, id, created } = message; - // Check if the message content contains any links that are not image links - const linkRegex = /(https?:\/\/[^\s]+(?$1"); messageParagraph.innerHTML = `${creator.username}: ${messageContent}`;