forum_blacklist

Добавить новый ник в ЧС в коде скрипта: var blacklist = ["Злая Киса", "ThoR"]. Готовая строчка с новым ником: var blacklist = ["Злая Киса", "Thor", "новый_ник"]. Редактировать код можно в расширении Tampermonkey.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         forum_blacklist
// @namespace    http://tampermonkey.net/
// @version      0.2.5
// @description  Добавить новый ник в ЧС в коде скрипта: var blacklist = ["Злая Киса", "ThoR"]. Готовая строчка с новым ником: var blacklist = ["Злая Киса", "Thor", "новый_ник"]. Редактировать код можно в расширении Tampermonkey.
// @author       You
// @license     GNU GPLv3
// @match       https://www.heroeswm.ru/forum*
// @match       https://my.lordswm.com/forum*
// @match       https://www.lordswm.com/forum*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==
let blacklist = ["Злая Киса", "ThoR"]
let msg_table = document.querySelector("body > center > table:nth-child(2) > tbody > tr > td > table > tbody")
let elements_to_remove_arr = []
for (let i = 2; i<=msg_table.children.length; i+=2){
    let msg_nickname= document.querySelector(`body > center > table:nth-child(2) > tbody > tr > td > table > tbody > tr:nth-child(${i}) > td:nth-child(1) > nobr > b`).lastChild.innerText
    if (blacklist.includes(msg_nickname)){
        let msg_footer = document.querySelector(`body > center > table:nth-child(2) > tbody > tr > td > table > tbody > tr:nth-child(${i})`)
        let msg = document.querySelector(`body > center > table:nth-child(2) > tbody > tr > td > table > tbody > tr:nth-child(${i+1})`)
        console.log(msg_footer.innerText); console.log(msg.innerText)
        elements_to_remove_arr.push(msg_footer); elements_to_remove_arr.push(msg)
    }
}
elements_to_remove_arr.forEach(element => {
    element.remove()
})