Lock and unlock page scrolling
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/589163/1889704/ScrollLocker.js
ScrollLocker is a lightweight utility script used to lock and restore page scrolling.
Once loaded into the page, call lock() and unlock() directly on the global scrollLocker object.
Call this when opening a modal, overlay, or sidebar:
scrollLocker.lock();
Call this when closing the modal or restoring normal page interaction:
scrollLocker.unlock();
scrollLocker.isLocked (Boolean): Indicates whether page scrolling is currently locked (true if locked, false otherwise).scrollLocker.lock() while already locked will not re-trigger or duplicate styles. Calling scrollLocker.unlock() when unlocked has no effect.