-
-
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
Update shortcuts.js handlers rewrite, multiple fixes #2421
Conversation
…lifies code a lot
…hortcutPlayPause, shorter shortcutStop
…step' to 'shortcuts_volume_step', 'shortcuts_playback_speed_step' to not mix those keys with real Shortcuts. rename 'shortcut_volume_step', 'shortcut_playback_speed_step' to 'shortcuts_volume_step', 'shortcuts_playback_speed_step' to not mix those keys with real Shortcuts. shortcut_ = shortcut; shortcuts_ = helper variable; replace defined storage with proper names
…aybackSpeed renamed 'shortcut_volume_step', 'shortcut_playback_speed_step' to 'shortcuts_volume_step', 'shortcuts_playback_speed_step' to not mix variable keys with function Shortcuts.
… and hold shortcuts
😅 Please just think about it some more 😅
maybe speed_step & volume_step? People want clickable buttons for speed too, which also has a complicated name (playerForcedPlaybackSpeed) Speed could have 4 sub-options and more sub-sub-options |
( what line/s? ) |
but reading further it doesnt prevent other listeners on same element https://www.aleksandrhovhannisyan.com/blog/interactive-guide-to-javascript-events/#stoppropagation-vs-stopimmediatepropagation so false alarm :)
I think we already talked about this. Someone loads page in the background tab = YT will autoplay only after switching to that tab, user switches to the tab after few minutes, settimeout would make that autoplay pass. |
youtube/js&css/web-accessible/www.youtube.com/player.js Lines 750 to 800 in be504b7
|
:-]
My rewrote function respects stepping is set by shortcuts_volume_step
the one you reverted to doesnt respect any limits and simply crashes after reaching 16, at this point shortcuts stop working altogether until page reload
What do you mean? shortcuts.js doesnt even load now because #2446 (comment) "braces, indentation, blockly, etc. are all the same." "Uncaught SyntaxError: Unexpected token 'var' (at VM481 shortcuts.js:358:2)" :(
I didnt rewrite those functions to make it look the way I like it, I rewrote it because it was broken :( e2c24bf youtube/menu/skeleton-parts/shortcuts.js Line 79 in afa1766
this isnt one liner, this is broken code leading to bugs Ok, I give up. Ill return in a month and see if anything changed. :( |
Please don't get exhausted 🥹♡ @raszpl
it changed from
reverted speed only. one might just has to chose a temporary revert /quick-fix within a given day or hour in favor of today's and tomorrow's users.
Want automatic linting
Yes, the old point is just: Any such format/s can co-exist with intentional other structure beyond it, like density, meant to suggest not spending time there. We are currently more relevant for this project than linting.
They are different themes for the same scheme (another one is flowcharts). Variants could be switched dynamically just like a CSS files. |
Chrome's limit comes with no crash & Firefox has no limit
( The names changed ) |
...PS: i also did regret a lot already in June, that i hardly worked here for several weeks, nor brought the time to say much unique or interesting or well-enough-written. ( And not everything i note down (quickly, in your PRs or anywhere) is to bother you, and could / should be moved to another list. Etc. ) Since i was a child I looked forward to motivating/meaningful teamwork, and still hope to enjoy/achieve better/more of that. For this project i should / we could prioritize the tasks very well (https://github.com/orgs/code-charity/projects/1 or better) And we should have [had an] assistant/intern/s already (it should be easy funding that with many users in a connected world with extremely imbalanced/unfair economy. ( And by now this project can assumably be accepted for GSoC or so #2043. ) |
hi! @raszpl, just saw your fork! (, so that your work currently has no users, because i reviewed automated whitespace changes, while you coincidentally saw the moment, that i undid some before recreating those, that do not lose human-written content) (where to report issues in the current state? /why disable the issues tab?) Isn't it wonderful (mentally & and for the users), to have a project where at least 2 people have thought about 100s or 1000s of issues? - Compared to most teams our work was very efficient and can be more efficient ( _given that i use to say that most comments are optional & assuming you agree. And that i said, i regret that i had to be mostly / mentally inactive in June unfortunately the misunderstandings where you seem to "have to explain too much" (which might helps the project if more people still read that later, while for me the keywords /links are usually enough.) To finish to recur the old topic of whitespace: i look forward to make sweeter use of longterm development processes, like the "blame" column on github: More importantly. Each of our effort is worth more! The project is still effective, even if i happen to do some boring/annoying commit-history-rewriting later, |
Yay!! @raszpl then you (or i?) should make it a PR ( except the deletions)
Our work for all the others can have significantly larger effects (user satisfaction), and more indirect ones if we try one way or another sooner than later. (Such as signing up at open-collective, to donate against hunger or pay some work, etc.) (
Not true here (as elaborated) (and if it was that would be a bad thing.) |
...So we should have a "merge-/sync-day" then asap🎆(?) @raszpl |
...then you want to remove or fix the license document? nice DOM statistics btw |
💭💭 |
Fixes:
Rewrote: shortcutQuality shortcutIncreasePlaybackSpeed shortcutDecreasePlaybackSpeed shortcutIncreaseVolume shortcutDecreaseVolume
Rewrote non working: shortcutRotateVideo shortcutToggleAutoplay
Reformatted: shortcutToggleCards
Fixed: shortcutToggleLoop
Safer: shortcutPictureInPicture shortcutPlayPause shortcutStatsForNerds
Simplified: shortcutStop shortcutSubscribe shortcutResetPlaybackSpeed shortcutGoToSearchBox shortcutActivateFullscreen shortcutLike shortcutDislike shortcutSeekBackward shortcutSeekForward
Fixed bugs:
My set of shortcuts breaks extension #1507 Default Youtube player shortcuts disabled on Opera browser. #2403 For some reason, the arrow keys don't advance/go back in time nor Up/Lower the Volume. Arrow keys just not working. #2406
Plans for our Shortcuts.js (deserves adoptive developers) (could be used globally eventually) #1565 but no, im not taking over shortcuts!
bug: can set the same shortcut as YouTube (=twice). Please Review our shortcuts.js vs. youtube defaults. #1815
Space to Play/Pause double pressing when adding space as a shortcut for play/pause #1889
Using keyboard shortcuts to pause/play makes pause/play not work #1993
probably Hotkey for resolution change only works 50% of the time #2046 Changing playback speed with a hotkey does not work reliably #2166
Problems:
Testing:
Doesnt crash on load in Chrome/Vivaldi/FF so thats something :P
Tested ~30% of shortcuts in Chrome. Your turn to find bugs in it.