mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
Added an "In-line Chat" option
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user