blacklist habr

Clear the main page of habr.com from blacklisted authors

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name           blacklist habr
// @author         Nemo (S1egfr1ed)
// @namespace      S1egfr1ed
// @version        1.1
// @description    Clear the main page of habr.com from blacklisted authors
// @match          https://habr.com/*
// @require        http://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @icon           http://habr.com/favicon.ico
// @grant          none
// @license        MIT
// ==/UserScript==

var blacklist=[];
// populate blacklist with you authors
blacklist.push('author');
const articles = document.querySelectorAll('article');
for(const article of articles){
    var author = article.getElementsByClassName('tm-user-info__userpic')[0];
    var name = author.attributes.getNamedItem('title').value;
    if(blacklist.includes(name)){
        article.remove();
    }
}