Script_Set_eddwardd

Block iklan gambling di website streaming/download

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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);

})();