A Chromium extension for YouTube that adds soft daily limits — friction and quality nudges rather than hard blocks. The idea is to make overuse a little costlier while still letting you choose when to continue.
Repo layout: Extension source lives in youtube-focus/.
- Daily caps — Track minutes watched, videos started, or whichever hits first (configurable in the popup).
- Playback buffer — After the limit, optional fullscreen countdown before play/resume (custom message, 3–120 seconds).
- Comments — Separate optional wait to reveal comments on
/watchwhile over limit (also 3–120 seconds). - Stream quality — After the limit: cap max resolution (144p–1080p), or aggressively stick to the lowest ladder rung (~144p). Uses a page-context script that aligns with YouTube’s quality mechanics.
- Browse thumbnails — On home, subscriptions, search grids, etc., optionally load lower-resolution stills when over limit.
- Good faith break — Types a short confirmation phrase to pause all extension effects for 15 minutes without changing your settings.
- Today’s stats — Popup shows usage vs limits; you can reset today’s counters manually.
- Clone this repository.
- Open Chrome (or another Chromium browser) →
chrome://extensions. - Enable Developer mode.
- Click Load unpacked and select the
youtube-focusfolder (the one containingmanifest.json). - Pin the extension if you like; open YouTube Stamina Focus from the toolbar to configure it.
| Permission | Why |
|---|---|
storage |
Saves settings and per-day stats locally (chrome.storage.local). |
https://www.youtube.com/* |
Injects the content script and page hook only on youtube.com. |
Nothing is sent to a server; everything stays on your machine.
- Manifest V3 Chromium extension (see
youtube-focus/manifest.json).
- Content script:
youtube-focus/content/content.js— limits, buffer UI, thumbnails, comments gate, wiring to storage. - Page script (quality):
youtube-focus/content/page-quality-hook.js— injected into the page context for stream quality behavior (see header comment in that file). - Popup:
youtube-focus/popup/
Bump the version in manifest.json when you cut a release build.