6Z网站隐藏反拦截弹窗

6Z网站隐藏反拦截弹窗。

// ==UserScript==
// @name         6Z网站隐藏反拦截弹窗
// @version      1.0
// @description  6Z网站隐藏反拦截弹窗。
// @author       DeepSeek
// @match        https://blog.6ziz.com/*
// @grant        none
// @run-at       document-start
// @namespace https://gf.qytechs.cn/users/452911
// ==/UserScript==

(function() {
    'use strict';

    // 创建并立即启动MutationObserver
    const observer = new MutationObserver(mutations => {
        for (const mutation of mutations) {
            for (const node of mutation.addedNodes) {
                if (node.nodeType === 1) checkAndHide(node);
            }
        }
    });

    // 检查并隐藏元素
    function checkAndHide(element) {
        const style = getComputedStyle(element);
        if ((style.zIndex === '2147483647' || parseInt(style.zIndex) === 2147483647) &&
            (style.width === '100%' || style.width === '100vw') &&
            (style.height === '100%' || style.height === '100vh')) {
            element.style.display = 'none';
            element.remove();
        }
        
        // 检查子元素
        for (const child of element.children) {
            checkAndHide(child);
        }
    }

    // 立即开始观察文档
    observer.observe(document, {
        childList: true,
        subtree: true,
        attributes: true,
        attributeFilter: ['style']
    });

    // 初始检查
    if (document.documentElement) {
        checkAndHide(document.documentElement);
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址