GetComics Cleaner

Removes spam links and sponsored content from GetComics.org

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

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

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!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

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

// ==UserScript==
// @name         GetComics Cleaner
// @namespace    https://getcomics.org/
// @version      1.0
// @license      MIT
// @description  Removes spam links and sponsored content from GetComics.org
// @author       KosherKale
// @match        https://getcomics.org/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    function cleanPage() {

        const spamPatterns = [
            "juicychat.ai",
            "craveu.ai",
            "elser.ai",
            "crushon.ai",
            "/cat/sponsored/"
        ];

        document.querySelectorAll("li a").forEach(link => {
            const href = link.getAttribute("href") || "";
            const text = link.textContent.trim();

            if (
                spamPatterns.some(pattern => href.includes(pattern)) ||
                text === "Sponsored"
            ) {
                link.closest("li")?.remove();
            }
        });

        document.querySelector("footer.page-footer")?.remove();
    }

    cleanPage();

    const observer = new MutationObserver(cleanPage);
    observer.observe(document.body, {
        childList: true,
        subtree: true
    });

})();