diff --git a/.common/utils/helpers.js b/.common/utils/helpers.js index 02293b4..cb51946 100644 --- a/.common/utils/helpers.js +++ b/.common/utils/helpers.js @@ -272,6 +272,11 @@ function RandomHex(str) { // Used to construct a message from "parts" variable commonly found in Streamer.bot chat messages function ConstructMessageFromParts(parts) { return parts.map(part => { + if (part.emoji) + return ` ${part.text} `; + if (!part.type) + return part.text; + switch (part.type) { case "text": diff --git a/horizontal-chat/script.js b/horizontal-chat/script.js index 08d4186..2b23ef3 100644 --- a/horizontal-chat/script.js +++ b/horizontal-chat/script.js @@ -903,7 +903,8 @@ function YouTubeMessage(data) { } // Set the message data - let message = RenderMessageWithEmotesHTML(data.message, data.emotes); + //let message = RenderMessageWithEmotesHTML(data.message, data.emotes); + let message = ConstructMessageFromParts(data.parts); // Set furry mode if (furryMode) diff --git a/multichat-overlay/script.js b/multichat-overlay/script.js index bcaf0b8..86b982e 100644 --- a/multichat-overlay/script.js +++ b/multichat-overlay/script.js @@ -1351,7 +1351,8 @@ async function YouTubeMessage(data) { } // Set the message data - let message = RenderMessageWithEmotesHTML(data.message, data.emotes); + //let message = RenderMessageWithEmotesHTML(data.message, data.emotes); + let message = ConstructMessageFromParts(data.parts); // Set furry mode if (furryMode) diff --git a/multichat-overlay/style.css b/multichat-overlay/style.css index 6bb465e..b391103 100644 --- a/multichat-overlay/style.css +++ b/multichat-overlay/style.css @@ -112,6 +112,10 @@ li { gap: 0.5em; } +#message { + word-break: break-word; /* Break long words if necessary */ +} + .add-this-class-to-the-thing-to-make-all-the-text-centered-vertically-because-that-looks-much-better { align-items: center; }