Added custom styling for moderators and subscribers

This commit is contained in:
nuttylmao
2025-09-22 09:37:21 +10:00
parent f5a8941e5b
commit 12af25b948
4 changed files with 45 additions and 2 deletions
+21
View File
@@ -690,6 +690,17 @@ async function TwitchChatMessage(data) {
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
// EXCEPT when the scroll direction is set to reverse (scrollDirection == 2)
const messageList = document.getElementById("messageList");
@@ -1334,6 +1345,16 @@ async function YouTubeMessage(data) {
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
// EXCEPT when the scroll direction is set to reverse (scrollDirection == 2)
+1 -1
View File
@@ -60,7 +60,7 @@ html {
li {
list-style: none;
overflow: hidden;
/* overflow: hidden; */
max-height: 0;
margin: 10px 0px 0px 0px;
transition: all 1s ease-in-out;