Shutdownchat Shadow Ignore

Ignore users without them knowing on shutdown.chat

  1. // ==UserScript==
  2. // @name Shutdownchat Shadow Ignore
  3. // @namespace http://tampermonkey.net/
  4. // @version 2023-12-29
  5. // @description Ignore users without them knowing on shutdown.chat
  6. // @author MeKLiN
  7. // @match https://www.shutdown.chat/rooms/downtown
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=shutdown.chat
  9. // @license MIT
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. // 608972616881592", "473915865480751", "755327001444987" one of these is wally
  14. //
  15. // 956020454044026 sheets alt,
  16. // 648106985166944 reckful
  17. // 625401812235506 snail
  18. // 497479872276396 beema
  19. // 755327001444987 blurr
  20. // Add the uuids of the users you want to block here
  21. var blocked_uuids = ["956020454044026", "648106985166944", "625401812235506", "497479872276396", "755327001444987"];
  22.  
  23. // Get the chatbox element
  24. var chatbox = document.querySelector(".chatbox");
  25.  
  26. // Create a mutation observer to monitor changes in the chatbox
  27. var observer = new MutationObserver(function(mutations) {
  28. // Loop through the added nodes
  29. mutations.forEach(function(mutation) {
  30. for (var i = 0; i < mutation.addedNodes.length; i++) {
  31. var node = mutation.addedNodes[i];
  32. // Check if the node is a chat message
  33. if (node.nodeName === "P" && node.dataset.t === "c") {
  34. // Get the uuid of the user who sent the message
  35. var uuid = node.querySelector(".nm.fcuser").dataset.uuid;
  36. // Check if the uuid is in the blocked list
  37. if (blocked_uuids.includes(uuid)) {
  38. // Hide the message
  39. node.style.display = "none";
  40. }
  41. }
  42. }
  43. });
  44. });
  45.  
  46. // Start observing the chatbox
  47. observer.observe(chatbox, {childList: true});