Shutdownchat Shadow Ignore

Ignore users without them knowing on shutdown.chat

目前為 2023-12-29 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==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});