Merge pull request #25 from nuttylmao/beta

• Fixed word wrapping
This commit is contained in:
nuttylmao
2026-02-27 03:21:07 +11:00
committed by GitHub
4 changed files with 13 additions and 2 deletions
+5
View File
@@ -272,6 +272,11 @@ function RandomHex(str) {
// Used to construct a message from "parts" variable commonly found in Streamer.bot chat messages // Used to construct a message from "parts" variable commonly found in Streamer.bot chat messages
function ConstructMessageFromParts(parts) { function ConstructMessageFromParts(parts) {
return parts.map(part => { return parts.map(part => {
if (part.emoji)
return ` <img src="${part.image}" alt="${part.text}" title="${part.text}" class="emote"> `;
if (!part.type)
return part.text;
switch (part.type) switch (part.type)
{ {
case "text": case "text":
+2 -1
View File
@@ -903,7 +903,8 @@ function YouTubeMessage(data) {
} }
// Set the message 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 // Set furry mode
if (furryMode) if (furryMode)
+2 -1
View File
@@ -1351,7 +1351,8 @@ async function YouTubeMessage(data) {
} }
// Set the message 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 // Set furry mode
if (furryMode) if (furryMode)
+4
View File
@@ -112,6 +112,10 @@ li {
gap: 0.5em; 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 { .add-this-class-to-the-thing-to-make-all-the-text-centered-vertically-because-that-looks-much-better {
align-items: center; align-items: center;
} }