Experience YouTube Shorts hands-free. Shorts Flow automatically scrolls to the next shorts when the current one ends, instantly skips ads, and adds an intuitive on-screen toggle right into the YouTube player.
- Clone or download this repository.
git clone https://github.com/CPT-Dawn/Shorts-Flow.git
- Open Google Chrome and navigate to
chrome://extensions/. - Enable Developer mode in the top right corner.
- Click Load unpacked and select the repository directory.
- Seamless Auto-Scrolling: Continuously scrolls to the next Short precisely when the current video finishes.
- Zero-Delay Ad Skipping: Detects sponsored content and ads instantly, scrolling past them before they play.
- Native UI Integration: Injects a sleek, non-intrusive toggle button directly above the 'Like' button in the Shorts player.
- Smart Comment Handling: Optionally pauses auto-scrolling when you are reading or typing in the comments section.
- Robust Detection: Built with dual URL and DOM observation to handle YouTube's Single Page Application (SPA) navigation flawlessly.
Once installed, Shorts Flow is designed to be unobtrusive. By default:
- Auto-Scroll is OFF when you launch your browser to prevent unexpected behavior.
- To enable it, simply click the extension icon in your browser toolbar and toggle Auto-Scroll, or use the Quick Toggle injected directly into the YouTube Shorts player.
- Navigate to YouTube Shorts and enjoy a hands-free experience.
Click the extension icon to access the settings panel:
- Auto-Scroll: The master switch for the extension's core functionality.
- Quick Toggle: Shows or hides the on-screen ON/OFF button injected into the YouTube player interface.
- Scroll with Comments: When enabled, the extension will continue to auto-scroll even if the comments panel is open. When disabled, opening comments acts as a temporary pause.
Shorts Flow is a Manifest V3 Chrome Extension engineered for performance and reliability against YouTube's highly dynamic DOM.
manifest.json: Configures permissions (storage), host matching strictly toyoutube.com/shorts/*, and registers the Service Worker and Content Scripts.script/content.js: The core engine.- Utilizes
MutationObserverand custom event listeners (yt-navigate-finish,ended,timeupdate) to detect video lifecycle changes. - Implements element-based tracking (
currentShortElement) and race-condition locks (isChecking) to maintain state stability without relying solely on DOM IDs. - Incorporates safety polling to catch edge cases where native
<video>events are swallowed by the browser.
- Utilizes
script/background.js: The Service Worker. Manages default installation states and ensures auto-scroll is safely disabled upon browser startup (chrome.runtime.onStartup).script/script.js& UI: A lightweight, accessible, and responsive popup interface that syncs instantly withchrome.storage.local.
Contributions, issues, and feature requests are welcome!
- Fork the project.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes following Conventional Commits.
- Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
- Use modern ES6+ JavaScript.
- Avoid arbitrary
setTimeoutdelays for DOM manipulation; preferMutationObserveror specific event listeners. - Handle potential
NotFoundErrorexceptions during DOM injection usingcontains()validation.
Distributed under the MIT License. See LICENSE for more information.