-
-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update functions.js fix Repeat button display #2085
Conversation
#2019 went overboard and broke Repeat button display
fix broken player_always_repeat button display
moving functionality to function
playerRepeat renamed to playerAlwaysRepeat, modified to change it-repeat-button when pressed, previously it only changed when reloading page or clicking twice playerRepeatButton (disabling&enabling)
playerRepeat renamed to playerAlwaysRepeat
synchronizing playerRepeatButton with playerAlwaysRepeat and improvedtubeYoutubeButtonsUnderPlayer below_player_loop. No need to reload page to se effect of one on others, clicking one updates all.
synchronizing playerRepeatButton with playerAlwaysRepeat and improvedtubeYoutubeButtonsUnderPlayer below_player_loop. No need to reload page to se effect of one on others, clicking one updates all.
formatting, indentation
cant have this style with dynamically injected improvedtubeYoutubeButtonsUnderPlayer
added createUnderPlayerButton helper function, dynamic improvedtubeYoutubeButtonsUnderPlayer injection
added createUnderPlayerButton helper function
dynamic improvedtubeYoutubeButtonsUnderPlayer injection and switching
Made blocklist dynamic, Disabling Blocklist automatically shows blocklisted videos without the need to refresh page.
lets merge this today without the "repeat"-commits for today. #2019 (comment) |
hi @raszpl! read your repeat buttons code by now. And all changes, missed appearance.js too at first (review will be accelerated when running automatic formatting [such as indentation, & spaces] as in a separate PR on the whole repo for once. Or maybe/ultimately continuously as a github action/routine/workflow) ( Previously only reacted on this frustration:
) so,
so long! thanks! (hope i didnt interrupt you? @raszpl) |
I stopped because it was too much changes for one patch, became messy.
but there are three buttons :) 4.804 : doesnt repeat despite both Loop buttons being active. Only refreshing whole page can get them to sync, but dont refresh, continue: 7 click one of the Loop buttons nothing visually happens, bad 8 Enable Always active nothing matches :) one shots loop active, other shows inactive
and I replied: "its tautology. What values can this.storage.player_always_repeat have?"
that would be ideal, settings that dont do anything just pollute user settings. Only settings that actually change from default YT behavior should be stored.
it was just preliminary code, I rewrote it couple of times since this and #2098, still testing locally
forest for the trees :) You dont like this:
while original code does DOM manipulations removing 3 elements every time its called
getElementById is practically free https://gomakethings.com/javascript-selector-performance/ Still this is all meaningless as improvedtubeYoutubeButtonsUnderPlayer will be edit: youtube/js&css/web-accessible/init.js Lines 8 to 15 in b8f441e
everything is potentially being run hundreds of times :( need to investigate further |
Syncing the two buttons just started here 282f7d6
Like i wondered years ago besides many of our features are set permanently
Right🤔 i guess search can consider tags, head or pathes in future
Yes, meant
👍 |
#2019 went overboard and broke Repeat button display
fix broken player_always_repeat button display
moving functionality to function
playerRepeat renamed to playerAlwaysRepeat, modified to change it-repeat-button when pressed, previously it only changed when reloading page or clicking twice playerRepeatButton (disabling&enabling)
synchronizing playerRepeatButton with playerAlwaysRepeat and improvedtubeYoutubeButtonsUnderPlayer below_player_loop. No need to reload page to se effect of one on others, clicking one updates all.
formatting, indentation
Update styles.css
cant have this style with dynamically injected improvedtubeYoutubeButtonsUnderPlayer
Update appearance.js
added createUnderPlayerButton helper function, dynamic improvedtubeYoutubeButtonsUnderPlayer injection
Update functions.js
added createUnderPlayerButton helper function
Update core.js
dynamic improvedtubeYoutubeButtonsUnderPlayer injection and switching
Update blocklist.js
Made blocklist dynamic, Disabling Blocklist automatically shows blocklisted videos without the need to refresh page.
Well, this has escalated quickly, wherever I look there is something to fix.