CleanChat

A script to clear all the errors in bloxd.io

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         CleanChat
// @namespace    http://tampermonkey.net/
// @version      2025-10-12
// @description  A script to clear all the errors in bloxd.io
// @author       Cvetocheckcactus (Цветочек Кактус)
// @match        https://bloxd.io/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=bloxd.io
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    const badWords = ['internalerror', 's to run more code', 'apierror', 'last error of', 'logging too many errors', 'syntaxerror', 'not a function', 'evalerror'];
    const hiddenMessages = [];

    const observer = new MutationObserver((mutationsList) => {
        for (const mutation of mutationsList) {
            if (mutation.type === 'childList') {
                mutation.addedNodes.forEach(node => {
                    if (node.nodeType === 1) {
                        const text = node.textContent.toLowerCase();

                        if (badWords.some(word => text.includes(word))) {
                            node.style.transition = 'all 0.3s ease';
                            node.style.opacity = '0';
                            node.style.height = '0';
                            hiddenMessages.push(node);
                        }
                    }
                });
            }
        }
    });

    setInterval(() => {
        observer.disconnect();
        const chat = document.querySelector('.ChatMessages');
        if (chat) {
            observer.observe(chat, {
                childList: true,
                subtree: false
            });
        }
    }, 10000);

    let hiddenVisible = false;

    document.addEventListener('keydown', (e) => {
        if (e.key.toLowerCase() === 'h') {
            hiddenVisible = !hiddenVisible;

            hiddenMessages.forEach(msg => {
                if (hiddenVisible) {
                    msg.style.height = '20px';
                    msg.style.opacity = '0.5';
                } else {
                    msg.style.height = '0';
                    msg.style.opacity = '0';
                }
            });
        }
    });

})();