From e4761eae791de57e6d4e19fe51fa40ed9e3d1be1 Mon Sep 17 00:00:00 2001 From: nutty Date: Sun, 10 May 2026 21:11:07 +1000 Subject: [PATCH] Added toggle for "Highlight Mentions" --- multichat-overlay/script.js | 7 ++++--- multichat-overlay/settings/settings.json | 8 ++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/multichat-overlay/script.js b/multichat-overlay/script.js index c1cdd15..a7cdbb4 100644 --- a/multichat-overlay/script.js +++ b/multichat-overlay/script.js @@ -42,6 +42,7 @@ const ignoreChatters = urlParams.get("ignoreChatters") || ""; const scrollDirection = GetIntParam("scrollDirection", 1); const groupConsecutiveMessages = GetBooleanParam("groupConsecutiveMessages", false); const inlineChat = GetBooleanParam("inlineChat", false); +const highlightMentions = GetBooleanParam("highlightMentions", true); const imageEmbedPermissionLevel = GetIntParam("imageEmbedPermissionLevel", 20); const showYouTubeLinkPreviews = GetBooleanParam("showYouTubeLinkPreviews", true); @@ -672,7 +673,7 @@ async function TwitchChatMessage(data) { // Highlight mentions const mentionRgx = new RegExp(`(^|\\s)@${twitchUsername}(\\s|$)`, 'i'); const mention = mentionRgx.test(data.text); - if (mention && showMessage) + if (mention && highlightMentions && showMessage) messageContainerDiv.classList.add("highlightMessage"); // Set furry mode @@ -1371,7 +1372,7 @@ async function YouTubeMessage(data) { // Highlight mentions const mentionRgx = new RegExp(`(^|\\s)@${youtubeUsername}(\\s|$)`, 'i'); const mention = mentionRgx.test(message); - if (mention && showMessage) + if (mention && highlightMentions && showMessage) messageContainerDiv.classList.add("highlightMessage"); // Set furry mode @@ -2348,7 +2349,7 @@ async function KickChatMessage(data) { // Highlight mentions const mentionRgx = new RegExp(`(^|\\s)@${kickUsername}(\\s|$)`, 'i'); const mention = mentionRgx.test(message); - if (mention && showMessage) + if (mention && highlightMentions && showMessage) messageContainerDiv.classList.add("highlightMessage"); // Set furry mode diff --git a/multichat-overlay/settings/settings.json b/multichat-overlay/settings/settings.json index 68d2f89..12e8da0 100644 --- a/multichat-overlay/settings/settings.json +++ b/multichat-overlay/settings/settings.json @@ -192,6 +192,14 @@ "defaultValue": false, "group": "General" }, + { + "id": "highlightMentions", + "label": "Highlight Mentions", + "description": "Highlight messages that mention the streamer", + "type": "checkbox", + "defaultValue": true, + "group": "General" + }, { "id": "imageEmbedPermissionLevel", "label": "Embed Images",