Shutdownchat Shadow Ignore

Ignore users without them knowing on shutdown.chat

当前为 2023-12-29 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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});