Script_Set_eddwardd

Block iklan gambling di website streaming/download

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Script_Set_eddwardd
// @namespace    http://tampermonkey.net/
// @version      1.1.1
// @description  Block iklan gambling di website streaming/download
// @author       You
// @match        *://*/*
// @grant        none
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Fungsi untuk block elemen
    function blockAds() {
        // Block berdasarkan class
        const klnElements = document.querySelectorAll('.kln');
        klnElements.forEach(el => {
            el.remove();
        });

        // Block center yang berisi kln
        const centers = document.querySelectorAll('center');
        centers.forEach(center => {
            if (center.querySelector('.kln')) {
                center.remove();
            }
        });

        // Block berdasarkan link gambling
        const gamblingLinks = [
            'akseskaiko.cam',
            'terbangrusia.site',
            'menujupenta.site',
            'goratu.site',
            'injd.site',
            'kegz.site',
            'goid.space',
            'bergurukecina.fun'
        ];

        document.querySelectorAll('a').forEach(link => {
            const href = link.getAttribute('href') || '';
            if (gamblingLinks.some(domain => href.includes(domain))) {
                // Hapus parent terdekat (bisa div atau center)
                let parent = link.closest('center, div.kln, .kln');
                if (parent) {
                    parent.remove();
                } else {
                    link.remove();
                }
            }
        });

        // Block gambar dari blogger.googleusercontent.com yang ada di kln
        document.querySelectorAll('img').forEach(img => {
            const src = img.getAttribute('src') || '';
            if (src.includes('blogger.googleusercontent.com')) {
                const parent = img.closest('.kln, center');
                if (parent) {
                    parent.remove();
                }
            }
        });
    }

    // Jalankan saat DOM ready
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', blockAds);
    } else {
        blockAds();
    }

    // Observer untuk elemen yang dimuat dinamis
    const observer = new MutationObserver(blockAds);
    observer.observe(document.documentElement, {
        childList: true,
        subtree: true
    });

    // Jalankan setiap 500ms untuk memastikan
    setInterval(blockAds, 500);

    // CSS tambahan untuk memastikan tersembunyi
    const style = document.createElement('style');
    style.textContent = `
        .kln,
        center:has(.kln),
        div:has(> .kln) {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
            height: 0 !important;
            width: 0 !important;
            overflow: hidden !important;
        }
    `;
    document.head.appendChild(style);

})();// ==UserScript==
// @name         Block Iklan Gambling
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Block iklan gambling di website streaming/download
// @author       You
// @match        *://*/*
// @grant        none
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Fungsi untuk block elemen
    function blockAds() {
        // Block berdasarkan class
        const klnElements = document.querySelectorAll('.kln');
        klnElements.forEach(el => {
            el.remove();
        });

        // Block center yang berisi kln
        const centers = document.querySelectorAll('center');
        centers.forEach(center => {
            if (center.querySelector('.kln')) {
                center.remove();
            }
        });

        // Block berdasarkan link gambling
        const gamblingLinks = [
            'akseskaiko.cam',
            'terbangrusia.site',
            'menujupenta.site',
            'goratu.site',
            'injd.site',
            'kegz.site',
            'goid.space',
            'bergurukecina.fun'
        ];

        document.querySelectorAll('a').forEach(link => {
            const href = link.getAttribute('href') || '';
            if (gamblingLinks.some(domain => href.includes(domain))) {
                // Hapus parent terdekat (bisa div atau center)
                let parent = link.closest('center, div.kln, .kln');
                if (parent) {
                    parent.remove();
                } else {
                    link.remove();
                }
            }
        });

        // Block gambar dari blogger.googleusercontent.com yang ada di kln
        document.querySelectorAll('img').forEach(img => {
            const src = img.getAttribute('src') || '';
            if (src.includes('blogger.googleusercontent.com')) {
                const parent = img.closest('.kln, center');
                if (parent) {
                    parent.remove();
                }
            }
        });
    }

    // Jalankan saat DOM ready
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', blockAds);
    } else {
        blockAds();
    }

    // Observer untuk elemen yang dimuat dinamis
    const observer = new MutationObserver(blockAds);
    observer.observe(document.documentElement, {
        childList: true,
        subtree: true
    });

    // Jalankan setiap 500ms untuk memastikan
    setInterval(blockAds, 500);

    // CSS tambahan untuk memastikan tersembunyi
    const style = document.createElement('style');
    style.textContent = `
        .kln,
        center:has(.kln),
        div:has(> .kln) {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
            height: 0 !important;
            width: 0 !important;
            overflow: hidden !important;
        }
    `;
    document.head.appendChild(style);

})();