Added an "In-line Chat" option

This commit is contained in:
nuttylmao
2025-04-04 13:03:03 +11:00
parent 1cc9630bb5
commit 9e50746707
2 changed files with 22 additions and 0 deletions
+14
View File
@@ -30,6 +30,7 @@ const hideAfter = GetIntParam("hideAfter", 0);
const excludeCommands = GetBooleanParam("excludeCommands", true); const excludeCommands = GetBooleanParam("excludeCommands", true);
const ignoreChatters = urlParams.get("ignoreChatters") || ""; const ignoreChatters = urlParams.get("ignoreChatters") || "";
const scrollDirection = GetIntParam("scrollDirection", 1); const scrollDirection = GetIntParam("scrollDirection", 1);
const inlineChat = GetBooleanParam("inlineChat", false);
const imageEmbedPermissionLevel = GetIntParam("imageEmbedPermissionLevel", 20); const imageEmbedPermissionLevel = GetIntParam("imageEmbedPermissionLevel", 20);
const showTwitchMessages = GetBooleanParam("showTwitchMessages", true); const showTwitchMessages = GetBooleanParam("showTwitchMessages", true);
@@ -377,6 +378,13 @@ async function TwitchChatMessage(data) {
if (data.message.isMe) if (data.message.isMe)
messageDiv.style.color = messageColor; messageDiv.style.color = messageColor;
// Remove the line break
if (inlineChat)
{
instance.querySelector("#colon-separator").style.display = `inline`;
instance.querySelector("#line-space").style.display = `none`;
}
// Render platform // Render platform
if (showPlatform) { if (showPlatform) {
const platformElements = `<img src="icons/platforms/twitch.png" class="platform"/>`; const platformElements = `<img src="icons/platforms/twitch.png" class="platform"/>`;
@@ -910,6 +918,12 @@ function YouTubeMessage(data) {
if (furryMode) if (furryMode)
messageDiv.innerText = TranslateToFurry(data.message); messageDiv.innerText = TranslateToFurry(data.message);
// Remove the line break
if (inlineChat)
{
instance.querySelector("#colon-separator").style.display = `inline`;
instance.querySelector("#line-space").style.display = `none`;
}
// Render platform // Render platform
if (showPlatform) { if (showPlatform) {
+8
View File
@@ -147,6 +147,14 @@
"defaultValue": 1, "defaultValue": 1,
"group": "General" "group": "General"
}, },
{
"id": "inlineChat",
"label": "In-line Chat",
"description": "Remove the line space after the username",
"type": "checkbox",
"defaultValue": true,
"group": "General"
},
{ {
"id": "imageEmbedPermissionLevel", "id": "imageEmbedPermissionLevel",
"label": "Embed Images", "label": "Embed Images",