block2078

Block screen and scrollbar till clicked

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/491233/1351458/block2078.js

document.documentElement.addEventListener('click', function () {
    const currentState = document.body.style.overflowY;

    if (currentState === 'hidden' || currentState === '') {
        document.documentElement.style.overflowY = 'auto';
    } else {
        document.documentElement.style.overflowY = 'auto';
    }
});

QingJ © 2025

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