fix: remove duplicate playback speed button code and settings#4166
Open
hkzo wants to merge 1 commit into
Open
Conversation
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 #3823
Summary
This PR removes the duplicate, overridden
ImprovedTube.playerPlaybackSpeedButtonimplementation and cleans up the redundant Playback Speed Button settings entry.
The active runtime implementation is left unchanged to minimize user-facing behavior changes.
Changes
playerPlaybackSpeedButtonimplementation fromjs&css/web-accessible/www.youtube.com/player.js.Player > Buttons > Playback speed buttonsettings entry.Player > Extra buttons inside the player > Playback Speed Buttonsettings entry.player_custom_playback_speedslider definition fromthe Buttons settings entry.
player_playback_speed_buttonstrings toplaybackSpeedButtonwhere needed, then remove the now-unusedplayer_playback_speed_buttonlocale entries.Why
ImprovedTube.playerPlaybackSpeedButtonwas defined twice inplayer.js.Because the later assignment overwrites the earlier one, only the later
implementation is active at runtime.
The related setting was also exposed in two places:
Player > Buttons > Playback speed buttonPlayer > Extra buttons inside the player > Playback Speed ButtonBoth settings entries controlled the same
player_playback_speed_buttonstorage key.The active player button is inserted into the left controls, so this PR keeps
the
Player > Buttonsentry and removes the duplicate "Extra buttons inside the player" entry.Notes
The removed
player_custom_playback_speedslider definition was not rendered bythe current
satus.rendersettings renderer, so it was not a functional settings control.Smart Speed still reads
player_custom_playback_speedas its fallback/baseplayback speed if that value already exists in storage. Since there was no
currently working UI for creating or editing that Smart Speed-referenced value,
removing this non-rendered slider definition does not change any editable settings UI.
This PR also does not change the active Playback Speed Button behavior. The
active implementation continues to use the existing
player_playback_speedsetting for left-click speed and
shortcuts_playback_speed_stepfor wheel adjustments.Since the remaining settings entry uses the
playbackSpeedButtonlocale key,the unused
player_playback_speed_buttonlocale key can also be removed. Forlocales that only had
player_playback_speed_button(de,es, andfr),the existing translated message was moved to
playbackSpeedButtonfirst.Testing
node --check js&css/web-accessible/www.youtube.com/player.jsnode --check menu/skeleton-parts/player.js_locales/*/messages.jsonfiles withJSON.parse.git diff --checkgrep -nE 'playerPlaybackSpeedButton = function|player_playback_speed_button:|children:[[:space:]]*\[|player_custom_playback_speed' "js&css/web-accessible/www.youtube.com/player.js" menu/skeleton-parts/player.js