Shutdownchat Shadow Ignore

Ignore users without them knowing on shutdown.chat

// ==UserScript==
// @name         Shutdownchat Shadow Ignore
// @namespace    http://tampermonkey.net/
// @version      2023-12-29
// @description  Ignore users without them knowing on shutdown.chat
// @author       MeKLiN
// @match        https://www.shutdown.chat/rooms/downtown
// @icon         https://www.google.com/s2/favicons?sz=64&domain=shutdown.chat
// @license      MIT
// @grant        none
// ==/UserScript==

// 608972616881592", "473915865480751", "755327001444987" one of these is wally
//
// 956020454044026 sheets alt,
// 648106985166944 reckful
// 625401812235506 snail
// 497479872276396 beema
// 755327001444987 blurr
// Add the uuids of the users you want to block here
var blocked_uuids = ["956020454044026", "648106985166944", "625401812235506", "497479872276396", "755327001444987"];

// Get the chatbox element
var chatbox = document.querySelector(".chatbox");

// Create a mutation observer to monitor changes in the chatbox
var observer = new MutationObserver(function(mutations) {
    // Loop through the added nodes
    mutations.forEach(function(mutation) {
        for (var i = 0; i < mutation.addedNodes.length; i++) {
            var node = mutation.addedNodes[i];
            // Check if the node is a chat message
            if (node.nodeName === "P" && node.dataset.t === "c") {
                // Get the uuid of the user who sent the message
                var uuid = node.querySelector(".nm.fcuser").dataset.uuid;
                // Check if the uuid is in the blocked list
                if (blocked_uuids.includes(uuid)) {
                    // Hide the message
                    node.style.display = "none";
                }
            }
        }
    });
});

// Start observing the chatbox
observer.observe(chatbox, {childList: true});