From b3375f4d5e36dbfe73819964b1bb003226b94b44 Mon Sep 17 00:00:00 2001 From: nutty Date: Fri, 27 Feb 2026 03:17:27 +1100 Subject: [PATCH] =?UTF-8?q?=E2=80=A2=20Fixed=20word=20wrapping=20=E2=80=A2?= =?UTF-8?q?=20Fixed=20YouTube=20emojis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .common/utils/helpers.js | 5 +++++ horizontal-chat/script.js | 3 ++- multichat-overlay/script.js | 3 ++- multichat-overlay/style.css | 4 ++++ 4 files changed, 13 insertions(+), 2 deletions(-) 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; }