From 8ea985c07a3130614c4e3b44ad70ae5fb355ebb8 Mon Sep 17 00:00:00 2001 From: ElementalAlchemist Date: Thu, 20 Oct 2022 22:48:30 -0500 Subject: [PATCH] Fix distortion of non-standard-size default emotes --- thrimbletrimmer/scripts/common.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/thrimbletrimmer/scripts/common.js b/thrimbletrimmer/scripts/common.js index 66a8635..2875055 100644 --- a/thrimbletrimmer/scripts/common.js +++ b/thrimbletrimmer/scripts/common.js @@ -677,11 +677,13 @@ function addChatMessageTextToElement(chatMessageData, messageTextElement) { const emoteImg = document.createElement("img"); emoteImg.src = `https://static-cdn.jtvnw.net/emoticons/v2/${emoteData.emote}/default/dark/1.0`; - emoteImg.classList.add("chat-replay-message-emote"); const emoteText = text.substring(emoteData.start, emoteData.end + 1); emoteImg.alt = emoteText; emoteImg.title = emoteText; - textAndEmote.push(emoteImg); + const emoteContainer = document.createElement("span"); + emoteContainer.classList.add("chat-replay-message-emote"); + emoteContainer.appendChild(emoteImg); + textAndEmote.push(emoteContainer); const remainingText = text.substring(emoteData.end + 1); if (remainingText !== "") {