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
+22
View File
@@ -591,6 +591,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
const messageList = document.getElementById("messageList");
if (groupConsecutiveMessages && messageList.children.length > 0) {
@@ -939,6 +950,17 @@ 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
const messageList = document.getElementById("messageList");
if (groupConsecutiveMessages && messageList.children.length > 0) {