AimIsADick Blocker 9000

Hides AimIsADick posts on teamfortress.tv website

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         AimIsADick Blocker 9000
// @description     Hides AimIsADick posts on teamfortress.tv website
// @include      *://*teamfortress.tv/*
// @include      *://*tf.gg/*
// @version 0.0.1.20210320153402
// @namespace https://greasyfork.org/users/749376
// ==/UserScript==

(function() {
    'use strict';
    var thread_container = document.getElementById("thread-container");
    if(thread_container) {
        var post_array = thread_container.getElementsByClassName("post");
        var remove_posts = [];
        for (let post of post_array) {
            if(post.querySelector(".post-header .post-author").innerHTML.includes("AimIsADick")) {
                remove_posts.push(post);
            }
        }
        while(remove_posts.length > 0) {
            let post = remove_posts.shift();
            if (!post.querySelector(".post-header .post-frag-container .minus").className.includes("clicked")) {
                fetch('/post/frag/'+post.id.replace(/[^\d]*/g,'')+'/minus');
            }
            post.parentNode.removeChild(post);
        }
    }
})();