SMTH_BLACKLIST

blacklist based on oooOOOooo's code

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         SMTH_BLACKLIST
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  blacklist based on oooOOOooo's code
// @author       You
// @match        https://www.mysmth.net/nForum/
// @grant        none
// ==/UserScript==

(function() {

    var code = `
//黑名单,英文逗号分隔
//修改完记得刷新页面,重新加载这个js
var blacklist = "coollpe,xiaoju,baoai";

bArray = blacklist.split(',');

$("body").on('DOMSubtreeModified', "#body", function() {
//隐藏主题
document.querySelectorAll('a.c63f').forEach(a=>{
bArray.forEach(b=>{
if(a.innerText==b){
a.parentNode.parentNode.style.display = 'none';
}
});
});
//隐藏回复
document.querySelectorAll('span.a-u-name').forEach(n=>{
bArray.forEach(b=>{
if(n.childNodes[0].innerText==b){
n.parentNode.parentNode.parentNode.parentNode.parentNode.style.display="none"
}
});
});
});
`;

    var script = document.createElement('script');
    script.textContent = code;
    (document.head||document.documentElement).appendChild(script);
    script.remove();

})();