A high-performance, lightweight Chrome Extension (Manifest V3) engineered to eliminate endless doomscrolling on YouTube Shorts. By locking vertical scroll navigation, suppressing on-screen navigation arrows, and enforcing single-video focus, Scroll Killer helps users maintain intentional viewing habits.
- Vertical Scroll Prevention: Intercepts and blocks vertical navigation triggered by mouse wheel scrolling, touch swipe gestures, and keyboard navigation keys (
ArrowUp,ArrowDown,PageUp,PageDown,Space). - On-Screen Arrow Suppression: Dynamically hides and removes YouTube's up and down navigation buttons.
- Master & Fine-Grained Controls: Toggle total protection ON/OFF instantly, or independently configure rules for Wheel/Swipe, Keyboard Keys, and Navigation Buttons.
- Active Video Context Detection: Automatically detects and displays the active Short title and channel name in the extension popup.
- Protection Metrics: Tracks blocked scroll attempts in real-time with an optimized, IPC-buffered local counter.
- Global Keyboard Shortcut: Toggle protection instantly using
Alt + S(Option + Son macOS) anywhere across YouTube. - Dual-Theme Design System: Seamlessly switch between Day (Light) and Night (Dark) themes with persistent state sync.
- Privacy & Security: 100% local execution—zero background tracking, analytics, or external API calls.
Scroll Killer is architected following modern Chrome Extension Manifest V3 best practices:
┌────────────────────────────────────────────────────────────────────────┐
│ Scroll Killer Extension │
└────────────────────────────────────────────────────────────────────────┘
│ │
▼ ▼
┌──────────────────────┐ ┌──────────────────────┐
│ Background Worker │ ◄── Storage ───► │ Popup Controller │
│ (background.js) │ Sync │ (popup.js/css/html) │
└──────────┬───────────┘ └──────────────────────┘
│
│ Chrome Runtime IPC Messages
▼
┌──────────────────────┐
│ Content Script │ ──► Enforces CSS Lock & Event Listeners
│ (content.js) │ ──► MutationObserver & SPA Lifecycle Listeners
└──────────────────────┘ ──► Local Metric Buffer & Periodic Flush
-
Event-Driven DOM Monitoring: Replaces interval polling loops with a debounced
MutationObservercombined with YouTube SPA lifecycle events (yt-navigate-finish,yt-page-data-updated,popstate). -
Zero-GC Keydown Interception: Uses a pre-allocated
Set(BLOCK_SCROLL_KEYS) for$O(1)$ key validation, preventing memory allocations and garbage collection pauses during key events. - Idempotent CSS Locking: Injects lock styles conditionally based on state hashing, eliminating browser style recalculations and layout thrashing.
- Buffered Metric IPC: Local scroll block attempts are buffered in memory and flushed to background storage in batches every 3 seconds or on tab unload, reducing extension IPC messaging overhead by over 95%.
-
Hardware-Accelerated UI: The popup UI leverages CSS custom properties and hardware-accelerated animations (
will-change,transform: translateZ(0)) for smooth 60 FPS transitions.
Scroll-Killer/
├── manifest.json # Manifest V3 extension configuration & permissions
├── background.js # Background service worker (state, badge, shortcut dispatcher)
├── content.js # YouTube content script (scroll locking, DOM observer, SPA hooks)
├── popup.html # Accessible popup markup (ARIA roles, semantic layout)
├── popup.js # Encapsulated popup state controller & theme manager
├── popup.css # Dual-theme design system (Light/Dark mode tokens & GPU transitions)
├── generate-icons.js # Node.js binary builder script for PNG icons
├── icons/ # Extension toolbar icons (16x16, 32x32, 48x48, 128x128)
│ ├── icon16.png
│ ├── icon32.png
│ ├── icon48.png
│ └── icon128.png
└── README.md # Technical documentation & usage guide
The extension persists user preferences in chrome.storage.local using the following schema:
{
"enabled": true,
"blockWheel": true,
"blockKeys": true,
"hideNavButtons": true,
"blockedCount": 0,
"theme": "light"
}- Default Shortcut:
Alt + S(Windows/Linux) /Option + S(macOS). - Customization: Click the Change button in the popup settings or navigate to
chrome://extensions/shortcutsto rebind the shortcut.
- Google Chrome, Brave, Microsoft Edge, or any Chromium-based browser supporting Manifest V3.
- (Optional) Node.js v14+ if rebuilding icons via
generate-icons.js.
- Clone or download this repository to your local machine:
git clone https://github.com/Yavagu/Scroll-Killer.git
- Open Chrome and navigate to:
chrome://extensions/ - Enable Developer mode in the top-right toggle switch.
- Click Load unpacked in the top-left toolbar.
- Select the
Scroll-Killerdirectory. - Pin Scroll Killer to your Chrome extension toolbar.
Scroll Killer includes a zero-dependency Node.js script that constructs standard PNG binaries (using native fs, path, and zlib modules) for all extension icon dimensions:
node generate-icons.jsOutput: Generates icon16.png, icon32.png, icon48.png, and icon128.png in the icons/ directory.
This project is open-source software. Licensed under the MIT License.