Jump to content

block people in chatbox


Acerd

Recommended Posts

// ==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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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