Foo
calebanderson.github.io
Public distribution links for custom libraries and extensions:
YouTube Controls Extension
Installation Instructions:
- Install the User JavaScript and CSS Chrome Extension
-
Add
https://calebanderson.github.io/youtube-playback.jsas a library source in the extension's Settings > Libraries area -
Create a rule for youtube.com and include the created library using the Options dropdown
- The extension requires some_ content in either JS or CSS (comments do satisfy this requirement)
- The "Programmatic Injection" option for JavaScript should remain off
-
Some configuration is exposed (see https://calebanderson.github.io/youtube-playback/constants.js)
- To change any of these values, add overrides to an object at
window.YTPOptions
- To change any of these values, add overrides to an object at
Features:
- Playback rate display
-
Square brackets increase/decrease playback rate based on a multiplicative scalar
- Default setting is based on 3 steps changing the playback rate by a factor of 2
-
Add bookmarks for the current point in the video with 'U'
- Click to return to the indicated timestamp
- Click with the Command or Windows key to remove a bookmark
- Endcard visibility toggle
- "Night Mode" auto-pause toggle (default pauses 15 minutes from last 'play' action)
- Add A-B loop point with 'O', clear A-B loop points with 'P'
- A good way to remember: typing the word 'loop' will add 2 points then clear them
bookmarkPrefix
'Go To'
The text that goes in front of the timestamp for bookmarks.
ratePrefix
'Playback Rate:'
The text that goes in front of the playback rate display.
endcardsHidden
'Endcards Hidden'
The text shown when endcards are hidden.
endcardsShown
'Endcards Shown'
The text shown when endcards are shown.
autoPauseOn
'Night Mode'
The text shown when auto-pausing is enabled. I called it "Night Mode" because it was created so I'd have
a better idea where I was in an audio book I listen to at night.
autoPauseOff
'Day Mode'
The text shown when auto-pausing is disabled. I called it "Day Mode" because it was the opposite of
"Night Mode".
autoPauseInterval
15
How long (in minutes) it takes for the auto-pause to trigger. Measured from the last "play" action.
rateScalar
1.2599
The current playback rate gets multiplied or divided by this value when stepping up or down.
Specifically these values were chosen so it takes 3 steps to double the playback speed, and stepping up
and down results in the same values.
rateAdder
0.00003
The current playback rate gets this value added to or subtracted from it when stepping up or down.
Specifically these values were chosen so it takes 3 steps to double the playback speed, and stepping up
and down results in the same values.
seekDuration
5
How far forward or backward the video seeks when pressing the seek keys. This was added because the
built-in seek keys only work when the video has been interacted with (to be honest the default behavior
on YouTube may be different at this point).
inputSelector
'yt-user-mention-autosuggest-input'
This JS selector is used to disable all the custom key bindings, so if you're trying to leave a comment
or search for a video you won't have any issues.
badgeContainerSelector
'#above-the-fold, ytd-video-primary-info-renderer #container'
This is the JS selector for the element the badges will be put inside of.
videoElementSelector
'video[src]'
This is the JS selector for the video element.
addBookmark
'uU'
This is the keybinding for adding a bookmark.
increaseRate
']}'
This is the keybinding for increasing the playback rate.
decreaseRate
'[{'
This is the keybinding for decreasing the playback rate.
seekForward
['ArrowRight']
This is the keybinding for seeking forward.
seekBackward
['ArrowLeft']
This is the keybinding for seeking backward.
addLoopPoint
'oO'
This is the keybinding for adding a loop point.
clearLoopPoints
'pP'
This is the keybinding for clearing all loop points.
Configuration options
Default Value