From e226d45dcea239ea3b9f233f5f88432fc0b470fb Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Tue, 15 Apr 2025 05:40:42 -0400 Subject: [PATCH] Fixed bug with flair in chat. --- www/js/channel/chat.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/www/js/channel/chat.js b/www/js/channel/chat.js index f9898f0..52d0c49 100644 --- a/www/js/channel/chat.js +++ b/www/js/channel/chat.js @@ -112,22 +112,22 @@ class chatBox{ highLevel.textContent = utils.unescapeEntities(`${data.highLevel}`); chatEntry.appendChild(highLevel); - //Create username label - var userLabel = document.createElement('p'); - userLabel.classList.add("chat-panel-buffer","chat-entry-username"); - + //If we're not using classic flair if(data.flair != "classic"){ + //Use flair var flair = `flair-${data.flair}`; + //Otherwise }else{ + //Pull user's assigned color from the color map var flair = this.client.userList.colorMap.get(data.user); } - //Create color span - var colorSpan = document.createElement('span'); - colorSpan.classList.add("chat-entry-flair-span", flair); - colorSpan.textContent = utils.unescapeEntities(`${data.user}`); - userLabel.textContent = utils.unescapeEntities(`${colorSpan.outerHTML}: `); + //Create username label + var userLabel = document.createElement('p'); + userLabel.classList.add("chat-panel-buffer", "chat-entry-username", flair); + userLabel.textContent = utils.unescapeEntities(data.user) + //Append user label chatEntry.appendChild(userLabel); //Create chat body