Development · Tip
Smooth Auto-Scroll DevTools Snippet
A console snippet for smooth auto-scrolling during screen recordings.
This simple JavaScript snippet runs in the browser console to auto-scroll web pages at around 60 frames per second. It eliminates shaky, manual mouse scrolling when recording product demos, portfolio showcases, or marketing screen captures. It can be stopped by refreshing the page or clearing the interval.
How it works
Paste this into the browser console (Chrome DevTools → Console):
setInterval(() => window.scrollBy(0, 4), 16);
This scrolls the page down 4px every 16ms (~60fps), producing a smooth continuous scroll — ideal for screen recordings. Follow-up: one could add a button to activate/disable it. Stop it by refreshing or clearing the interval.
What it's for
- Record steady website scroll recordings for video demos
- Showcase long-form landing pages without manual trackpad jitter
- Create smooth scrolling GIFs or video clips for social media
Key points
- Runs directly in the browser DevTools console without extensions
- Scrolls down in small, consistent increments at ~60fps
- Requires zero dependencies or external libraries
- Stops simply by refreshing the tab or clearing the interval timer
Pricing
Free
Details
- Type
- Tip
- Category
- Development
- Topic
- DevTools & Scripts
- Open source
- No
- Platforms
- Web
- For
- Developers, designers, and creators recording screen demos
- Tags
- javascript, devtools, screen recording, productivity, tips
Why it was saved
- @FlorinPop17: Fixes the common problem of shaky, janky scrolling when recording a website demo.
Related
Open-source animation library for React, Vue, and vanilla JavaScript
Lightweight, modular JavaScript animation engine for CSS, SVG, and DOM elements
High-performance JavaScript animation library for web elements, SVG, and canvas.
Animated, accessible rolling-number component built on native Intl.NumberFormat and Web Animations.
In-browser video and audio conversion library powered by the WebCodecs API.
Annual overview of the fastest-growing JavaScript GitHub repositories in 2023.
Updated