overlay2078

Turn the hole screen black till hovermouse

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/491238/1352698/overlay2078.js

document.addEventListener('DOMContentLoaded', function () {
    const overlay = document.createElement('div');
    overlay.classList.add('overlay');
    document.body.appendChild(overlay);

    overlay.style.position = 'absolute';
    overlay.style.top = '-10vh';
    overlay.style.left = '-10vw';
    overlay.style.width = '120vw';
    overlay.style.height = '420vh';
    overlay.style.backgroundColor = 'black';
    overlay.style.zIndex = '400';

    document.body.addEventListener('mouseover', function () {
        if (overlay) {
            overlay.style.display = 'none';
        }
    });
    document.addEventListener('touchstart', function () {
        if (overlay) {
            overlay.style.display = 'none';
        }
    });
    document.addEventListener('mouseleave', function () {
        if (overlay) {
            overlay.style.display = 'none';
        }
    });
});

QingJ © 2025

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