Greasy Fork is available in English.

overlay2078

Turn the hole screen black till hovermouse

Script này sẽ không được không được cài đặt trực tiếp. Nó là một thư viện cho các script khác để bao gồm các chỉ thị meta // @require https://update.greasyfork.org/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';
        }
    });
});