Block Ad Cards

Hide ad cards on itorrents-igruha.org / itorrents-igruha.net

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Block Ad Cards
// @namespace    http://tampermonkey.net/
// @version      1.5
// @description  Hide ad cards on itorrents-igruha.org / itorrents-igruha.net
// @match        https://itorrents-igruha.org/*
// @match        https://itorrents-igruha.net/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    function hideAdCards() {
        const adLinks = [
            '/790-warface-varfeys.html',
            '/652-war-thunder.html',
            '/16750-malinovka.html',
            '/465-crossout.html',
            '/17336-blum.html',
            '/17116-random-key-steam.html',
            '/17102-skidki-na-igry.html',
            '/1131-counter-strike-16.html',
            '/1983-me-enlisted-download.html',
            '/16751-divine-ark.html',
            '/778-world-of-tanks.html',
            '/72-world-of-warships.html',
            '/72-22-world-of-warships.html',
            '/19761-gta-samp-evolve-role-play.html',
            '/17225-899008.html',
            '/5782-black-myth-wukong.html',
            '/16749-lineage-2-essence.html',
            '/17904-1-8989556.html',
            '/72-21-world-of-warships-download.html'//,
            //'/17221-premium-user.html'
        ];

        adLinks.forEach(link => {
            const cards = document.querySelectorAll(`a[href*="${link}"]`);
            cards.forEach(card => {
                const parentCard = card.closest('.short-item22') || card.closest('.article-film') || card.closest('div') || card;
                parentCard.style.display = 'none';
            });
        });

        const recommendedElements = document.querySelectorAll('.menusidebar');
        recommendedElements.forEach(element => {
            if (element.textContent.includes('Советуем 🔥')) {
                element.style.display = 'none';
            }
        });

        const allArticleFilms = document.querySelectorAll('.article-film');
        allArticleFilms.forEach(film => {
            const link = film.querySelector('a');
            if (link && adLinks.some(adLink => link.href.includes(adLink))) {
                film.style.display = 'none';
            }
        });
        const torrent3Elements = document.querySelectorAll('.torrent3');
        torrent3Elements.forEach(element => {
            element.style.display = 'none';
        });

    }

    hideAdCards();

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