Repository navigation
Conversation
Counts playback seconds per local day, pauses at the limit with a 5-minute extension, and can toast a break reminder. Uses its own storage key, not the Analyzer data.
chirag127
marked this pull request as ready for review
November 18, 2026 10:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4078.
What this adds
Two independent limits under General → Time limiter:
0turns it off.Only playback counts: the timer checks
video.paused,video.endedanddocument.hidden, and caps a single tick at 5 s so a sleeping laptop or a background tab does not add an hour. The count rolls over at local midnight.Design notes
time_limiter_data={date, seconds, bonus}), written through the extension bridge with{action:'set'}. The Analyzer's data is untouched, so the two features can disagree without corrupting each other.bonusfor the current day, not as a one-off flag, so it survives a reload and resets tomorrow.Where it lives
js&css/web-accessible/www.youtube.com/features/time-limiter.jsmenu/skeleton-parts/time-limiter.js_locales/en/messages.jsonmanifest.json,js&css/extension/init.js,menu/index.htmltests/unit/time-limiter.test.jsVerification
Live in Chrome 157 on
watch?v=dQw4w9WgXcQwith a 1-minute limit and 60 s already used:Not tested
Conflicts
New files only. #4078 is the only issue for this; no open PR mentions a time limiter (checked the 160 open PR titles/bodies for limit/timer/break). Off by default.