Greasy Fork is available in English.
Enables smooth page scrolling using JavaScript. Improved from an initial concept by Winceptor.
Description:
This UserScript enhances your browsing experience by enabling smooth, animated scrolling on web pages. Unlike the default, jarring scroll behavior, this script provides a more fluid and visually pleasing way to navigate through content. It's designed to be customizable, allowing you to adjust the scrolling speed and smoothness to your personal preference.
Note: While this script is designed to be lightweight and performant, users on low-end PCs may experience some slight lag during scrolling. This is due to the increased processing required for the smooth animation.
Key Features:
How It Works:
This UserScript listens for mouse wheel (or trackpad) scroll events. When it detects one, it smoothly animates the scroll position of the page or scrollable element. It works by:
requestAnimationFrame
to incrementally move the scroll position, creating a smooth effect.Settings:
The script includes adjustable settings that you can modify in the script's code:
scrollSmoothness
: Controls the animation smoothness. A value of 0
means the scroll will be very smooth and slow, 1
means the animation is going to be closer to the default speed. The best value is somewhere around 0.5
.scrollAcceleration
: Controls how fast the scroll speed increases. Higher values cause a more aggressive acceleration, lower values less of an acceleration.debugMode
: Set to 1
to see console logs from the script; set to 0
to disable logging.targetRefreshRate
: Target animation refresh rate.maxRefreshRate
: Maximum refresh rate used for the animation.minRefreshRate
: Minimum refresh rate used for the animation.animationDuration
: Maximum duration (in milliseconds) for a scroll animation.scrollThreshold
: Minimum scroll distance required to trigger the smooth scrolling animation.passiveEventListeners
: If you want to use passive event listeners, set to true
; false
is the default value.Installation: