mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
Added custom styling for moderators and subscribers
This commit is contained in:
@@ -591,6 +591,17 @@ async function TwitchChatMessage(data) {
|
|||||||
avatarDiv.appendChild(avatar);
|
avatarDiv.appendChild(avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Custom styling for subs
|
||||||
|
if (data.message.subscriber) {
|
||||||
|
usernameDiv.classList.add('sub-glow')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Custom styling for mods
|
||||||
|
// 3 = Moderator
|
||||||
|
if (role == 3) {
|
||||||
|
usernameDiv.classList.add('moderator-glow')
|
||||||
|
}
|
||||||
|
|
||||||
// Hide the header if the same username sends a message twice in a row
|
// Hide the header if the same username sends a message twice in a row
|
||||||
const messageList = document.getElementById("messageList");
|
const messageList = document.getElementById("messageList");
|
||||||
if (groupConsecutiveMessages && messageList.children.length > 0) {
|
if (groupConsecutiveMessages && messageList.children.length > 0) {
|
||||||
@@ -939,6 +950,17 @@ function YouTubeMessage(data) {
|
|||||||
avatarDiv.appendChild(avatar);
|
avatarDiv.appendChild(avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Custom styling for subs
|
||||||
|
if (data.user.isSponsor) {
|
||||||
|
usernameDiv.classList.add('sub-glow')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Custom styling for mods
|
||||||
|
// 3 = Moderator
|
||||||
|
if (data.user.isModerator) {
|
||||||
|
usernameDiv.classList.add('moderator-glow')
|
||||||
|
}
|
||||||
|
|
||||||
// Hide the header if the same username sends a message twice in a row
|
// Hide the header if the same username sends a message twice in a row
|
||||||
const messageList = document.getElementById("messageList");
|
const messageList = document.getElementById("messageList");
|
||||||
if (groupConsecutiveMessages && messageList.children.length > 0) {
|
if (groupConsecutiveMessages && messageList.children.length > 0) {
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ html {
|
|||||||
|
|
||||||
li {
|
li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
overflow: hidden;
|
/* overflow: hidden; */
|
||||||
max-width: 0px;
|
max-width: 0px;
|
||||||
transition: all 1s ease-in-out;
|
transition: all 1s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -690,6 +690,17 @@ async function TwitchChatMessage(data) {
|
|||||||
avatarDiv.appendChild(avatar);
|
avatarDiv.appendChild(avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Custom styling for subs
|
||||||
|
if (data.message.subscriber) {
|
||||||
|
usernameDiv.classList.add('sub-glow')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Custom styling for mods
|
||||||
|
// 3 = Moderator
|
||||||
|
if (role == 3) {
|
||||||
|
usernameDiv.classList.add('moderator-glow')
|
||||||
|
}
|
||||||
|
|
||||||
// Hide the header if the same username sends a message twice in a row
|
// Hide the header if the same username sends a message twice in a row
|
||||||
// EXCEPT when the scroll direction is set to reverse (scrollDirection == 2)
|
// EXCEPT when the scroll direction is set to reverse (scrollDirection == 2)
|
||||||
const messageList = document.getElementById("messageList");
|
const messageList = document.getElementById("messageList");
|
||||||
@@ -1334,6 +1345,16 @@ async function YouTubeMessage(data) {
|
|||||||
avatarDiv.appendChild(avatar);
|
avatarDiv.appendChild(avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Custom styling for subs
|
||||||
|
if (data.user.isSponsor) {
|
||||||
|
usernameDiv.classList.add('sub-glow')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Custom styling for mods
|
||||||
|
// 3 = Moderator
|
||||||
|
if (data.user.isModerator) {
|
||||||
|
usernameDiv.classList.add('moderator-glow')
|
||||||
|
}
|
||||||
|
|
||||||
// Hide the header if the same username sends a message twice in a row
|
// Hide the header if the same username sends a message twice in a row
|
||||||
// EXCEPT when the scroll direction is set to reverse (scrollDirection == 2)
|
// EXCEPT when the scroll direction is set to reverse (scrollDirection == 2)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ html {
|
|||||||
|
|
||||||
li {
|
li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
overflow: hidden;
|
/* overflow: hidden; */
|
||||||
max-height: 0;
|
max-height: 0;
|
||||||
margin: 10px 0px 0px 0px;
|
margin: 10px 0px 0px 0px;
|
||||||
transition: all 1s ease-in-out;
|
transition: all 1s ease-in-out;
|
||||||
|
|||||||
Reference in New Issue
Block a user