Jump to content

block people in chatbox


Recommended Posts

Posted
// ==UserScript==
// @name         Chatbox Blocker
// @namespace    
// @version      0.1
// @description  Blocks peoples' messages in chatbox
// @author       Soldtodie
// @match        http://tampermonkey.net/index.php?ext=dhdg
// @grant        none
// ==/UserScript==

(function() {
var blocked = ["name1", "name2", "name3", "name4", "name5"];

remove();

function remove() {
    var elements = document.getElementsByTagName("small");

    for (var i = 0; i < elements.length; i++) {
        var name = elements[i].children[0].children[0].children[0].innerText.toString();

        for (var b = 0; b < blocked.length; b++) {
            if (name === blocked[b]) {
                elements[i].parentElement.remove();
                break;
            }
        }
    }

    setTimeout(remove, 100);
}
})();

all credits goes to soldtodie , script isnt very reliable (wont block the messages at all sometimes, dunno how to fix) but better than nothing

replace names in the blocked variable

use with tampermonkey

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...