diff --git a/assets/chat/css/menus/_user-info.scss b/assets/chat/css/menus/_user-info.scss index d91a0c80..df5a0118 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:first-child { + margin-top: 0.75em; + } + } } .chat-tool-btn { 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)); }); }