From a48296a6aed5b71957d7900c7c5b1ec485a2e0e7 Mon Sep 17 00:00:00 2001 From: zrowdotnet Date: Sat, 16 Nov 2024 10:55:25 -0500 Subject: [PATCH 1/3] fix #479 --- assets/chat/js/menus/ChatUserInfoMenu.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/assets/chat/js/menus/ChatUserInfoMenu.js b/assets/chat/js/menus/ChatUserInfoMenu.js index d97f366c..d0fd99a3 100644 --- a/assets/chat/js/menus/ChatUserInfoMenu.js +++ b/assets/chat/js/menus/ChatUserInfoMenu.js @@ -356,10 +356,18 @@ export default class ChatUserInfoMenu extends ChatMenuFloating { nextMsg = nextMsg.next('.msg-continue'); } this.messageArray.forEach((element) => { - const text = element.find('.text')[0].innerText; + const textContainer = element.find('.text')[0]; + let rawText = ''; + for (const node of textContainer.childNodes) { + if (node instanceof HTMLAnchorElement) { + rawText += node.href; + } else { + rawText += node.textContent; + } + } // Create a new `ChatUser` to remove username styles for a cleaner look. - const msg = MessageBuilder.message(text, new ChatUser(nick)); + const msg = MessageBuilder.message(rawText, new ChatUser(nick)); displayedMessages.push(msg.html(this.chat)); }); } From 6e35c774ed204866b1263462122f509d99a2904d Mon Sep 17 00:00:00 2001 From: zrowdotnet Date: Sat, 16 Nov 2024 11:31:50 -0500 Subject: [PATCH 2/3] emotes no longer decapitated in the user info menu chat render --- assets/chat/css/menus/_user-info.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/chat/css/menus/_user-info.scss b/assets/chat/css/menus/_user-info.scss index d91a0c80..6f06f302 100644 --- a/assets/chat/css/menus/_user-info.scss +++ b/assets/chat/css/menus/_user-info.scss @@ -48,6 +48,12 @@ $toolbar-icons-map: ( .scrollable { background: a.$color-chat-bg; } + + .content { + .msg-chat { + margin-top: 0.75em; + } + } } .chat-tool-btn { From d4a9e9d90412b715c95ebfc4f41281e635e17c2c Mon Sep 17 00:00:00 2001 From: zrowdotnet Date: Sat, 16 Nov 2024 11:42:37 -0500 Subject: [PATCH 3/3] account for continued messages --- assets/chat/css/menus/_user-info.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/chat/css/menus/_user-info.scss b/assets/chat/css/menus/_user-info.scss index 6f06f302..df5a0118 100644 --- a/assets/chat/css/menus/_user-info.scss +++ b/assets/chat/css/menus/_user-info.scss @@ -50,7 +50,7 @@ $toolbar-icons-map: ( } .content { - .msg-chat { + .msg-chat:first-child { margin-top: 0.75em; } }