-
-
Notifications
You must be signed in to change notification settings - Fork 544
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
shortcuts.js continue #2421 rewrite #2429
Conversation
…ns only on playlist
why? ( ~ 862#issuecomment-813124694:~:text=hover )
youtube's DOM names might change unlike clientHeight.
Can be
lol
youtube/js&css/web-accessible/www.youtube.com/playlist.js Lines 93 to 128 in 41280ef
( At need English will cover a lot of users globally, so it could be a good backup & one could add the most common ones ( Korean for ImprovedTube) - or ALL youtube languages, at least #1752 started getting all of them before (for our _locales). Greetings @Lauviah0622 ) |
cancel keydown/wheel event before we call target handler, crashing handler wont keep 'cancelled' keys stuck cancelled a Set so it dosnt hold multiple keys
clunky and unreliable, easier to just check directly on every click
previously they only worked once because removeAttribute('visibility'); was breaking YT buttons. So you could click once to show Chapters .. and that was it, neither clicking shortcut nor clicking X was closing it.
anything that lets user know this is switching on/off.
It comes back to user intent. User sets Looping, presses Play and lets YT take over = looping. User clicks NEXT manually forcing selection = YT disables autopilot and turns off looping. Just like Autopilot or ordinary car Cruise Control, automation until user interaction.
yep, I even got this issue link in comments on my local copy :D I was looking at it 4 days ago after I wrote #2276 (comment)
after investigating there is no way I can find of reading back status of Looping/Shuffle from YT API, only button aria text and by the icons :| |
YT doesnt appear to remove this button, if it ever comes up individual mutation observer will be much lighter
i meant, many more future uses for "hover UIs" 862#issuecomment-813124694:~:text=hover. |
good point! 😅 (what about considering both of the above?)
makes sense of course if you wanted to tell users bout the fix 💡 |
( the loop button has two states. Playlist loop is a higher-level decision (for hours usually). |
yay
yes.
means only the current video. while 💭 our loop button was planned like:
|
yes, and it still works, just not using Listener :) youtube/js&css/web-accessible/www.youtube.com/shortcuts.js Lines 122 to 124 in e828ff6
Yes, I thought about it, there can be fallback to "removeAttribute('visibility'); breaking close() button version" in case enable button cant be found. Edit: added shortcutChapters shortcutTranscript btureforce fallback, will try removeAttribute('visibility') if it cant find proper button + will emit error in console so user isnt totally confused why he cant close Chapters/Transcript
YT cancels both after user clicks Next
that will need new code, what was in Next buttons didnt work even with English language.
that will require telemetry. The only way this could pass the smell test is if maybe on first Settings open after update if showed "would you like to share blabla", but even that will be seen as annoying :( Hmm maybe if it was under the usual circle buttons and just over "please rate us", something like "Vote for favorite function, request missing functions" leading to a webform survey, with a popup when clicking asking "Would you like to share your anonymized settings so we can concentrate on polishing options you use the most?".
good to know, so when fixing playlistRepeat() it will require callback to function updating other custom Loop button visibility states. |
https://developer.chrome.com/docs/extensions/reference/api/i18n when translation wont change grammar, instead of shortcuts_chapters the text can consist of three messages: {chapters} + "(" + {sidebar} + ")" + {toggle} |
removeAttribute('visibility');
was breaking YT buttons. includes bruteforce fallback and appropriate error message'Toggle sidebar Chapters' 'Toggle sidebar Transcript'Chapter (Sidebar) On/Off