Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Block Wally
- // @namespace http://tampermonkey.net/
- // @version 2023-12-29
- // @description try to take over the world!
- // @author You
- // @match https://www.shutdown.chat/rooms/downtown
- // @icon https://www.google.com/s2/favicons?sz=64&domain=shutdown.chat
- // @grant none
- // ==/UserScript==
- // Add the uuids of the users you want to block here
- var blocked_uuids = ["608972616881592", "473915865480751", "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});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement