SleepSnug Scripts for Tampermonkey
Posted: Thu Mar 16, 2023 2:07 am
Thanks to deepstate for writing these.
Script to mute snugcoin spam in the chat
Link to pastebin: https://pastebin.com/8UFtZAzr
// ==UserScript==
// @name MuteSnugspam
// @namespace http://tampermonkey.net/
// @version 0.1
// @description mutes snugcoin spam
// @author deepstate
// @match http://cytu.be/r/sleepsnug
// @match https://cytu.be/r/sleepsnug
// @match http://www.cytu.be/r/sleepsnug
// @match https://www.cytu.be/r/sleepsnug
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
'use strict';
var chatbox = document.getElementById("messagebuffer");
setInterval(function(){
var msg_list = chatbox.getElementsByTagName('*');
for (var i = 0; i < msg_list.length; i++) {
if(msg_list.item(i).className.includes("chat-msg-")){
msg_list.item(i).querySelectorAll('span').forEach(curr_span => {
if (curr_span.textContent.startsWith("/snugcoin"))
{
msg_list.item(i).remove();
}
})
}
}
},750);
})();
Script to mute snugcoin spam in the chat
Link to pastebin: https://pastebin.com/8UFtZAzr
// ==UserScript==
// @name MuteSnugspam
// @namespace http://tampermonkey.net/
// @version 0.1
// @description mutes snugcoin spam
// @author deepstate
// @match http://cytu.be/r/sleepsnug
// @match https://cytu.be/r/sleepsnug
// @match http://www.cytu.be/r/sleepsnug
// @match https://www.cytu.be/r/sleepsnug
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
'use strict';
var chatbox = document.getElementById("messagebuffer");
setInterval(function(){
var msg_list = chatbox.getElementsByTagName('*');
for (var i = 0; i < msg_list.length; i++) {
if(msg_list.item(i).className.includes("chat-msg-")){
msg_list.item(i).querySelectorAll('span').forEach(curr_span => {
if (curr_span.textContent.startsWith("/snugcoin"))
{
msg_list.item(i).remove();
}
})
}
}
},750);
})();