A Tampermonkey userscript that helps prevent infinite scrolling by implementing smart scroll detection and enforced breaks.
- Universal compatibility with all websites
- Smart scroll speed detection
- Persistent scroll tracking across page refreshes
- Enforced break periods with a modern, user-friendly overlay
- Multiple scroll prevention methods (mouse wheel, touch, DOM events)
- Activity-based timer reset
-
Install the Tampermonkey browser extension:
-
Click on the Tampermonkey icon in your browser and select "Create a new script"
-
Copy the entire contents of
scroll-break-point.jsinto the editor -
Click File → Save or press Ctrl+S (Cmd+S on Mac)
The script monitors your scrolling behavior using several metrics:
- Total Scroll Distance: Tracks how far you've scrolled in pixels
- Scroll Speed: Monitors how quickly you're scrolling
- Time Spent: Keeps track of continuous scrolling time
When any of these metrics exceed their limits:
- Total scroll distance > 5000 pixels
- Scroll speed > 100 pixels/second
- Time spent > 10 minutes
The script will:
- Display a friendly overlay suggesting a break
- Temporarily prevent further scrolling for 3 minutes
- Provide mindful suggestions during the break
- Automatically resume normal functionality after the break
The script comes with default settings that you can modify in the config object:
const config = {
SCROLL_LIMIT: 5000, // Maximum scroll distance in pixels
TIME_LIMIT: 10 * 60 * 1000, // Maximum time before break (10 minutes)
BLOCK_DURATION: 3 * 60 * 1000, // Break duration (3 minutes)
SCROLL_SPEED_LIMIT: 100, // Maximum scroll speed (pixels/second)
CHECK_INTERVAL: 100, // How often to check scroll speed (milliseconds)
};- After installing the script, visit a website with infinite scroll like Twitter, Reddit, or Facebook
- Start scrolling continuously. You can test different trigger conditions:
- Rapid scrolling: Quickly scroll up and down to trigger the speed limit
- Distance scrolling: Continuously scroll down a long page
- Time-based: Keep scrolling periodically for over 10 minutes
To test with lower thresholds during development:
const config = {
SCROLL_LIMIT: 1000, // Lower scroll limit for faster testing
TIME_LIMIT: 1 * 60 * 1000, // Reduce to 1 minute
BLOCK_DURATION: 30 * 1000, // Reduce to 30 seconds
SCROLL_SPEED_LIMIT: 50, // More sensitive speed detection
CHECK_INTERVAL: 100,
};You can modify these values in Tampermonkey's editor and save to immediately test with new settings.
Feel free to submit issues and enhancement requests!
If the script isn't working:
- Make sure Tampermonkey is enabled
- Check if the script is enabled in Tampermonkey's dashboard
- Try refreshing the page
- Check browser's console for any errors (Press F12 to open DevTools)