-
-
Notifications
You must be signed in to change notification settings - Fork 515
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
Small fix & updated video and playlist URL-less popups #1844
Small fix & updated video and playlist URL-less popups #1844
Conversation
fixed error when querySelecetors don't find their target (fixed chaining of `?.`)
formatting/refactoring and removed title change (gets changed on its own)
formatting and removed title
fixed variable name and removed title (also added a comment)
- fixed when opening video and playlist when video is >200th of playlist it starts at first entry (←normal), but at the start-time where the initial video was at, which might result in the video to skip to the end and immediately play the next (←problem) - added the URL-less popup call to playlist button (to update popup window to a URL-less popup)
😮 😮 🥰 thanks! yes ("Error: Invalid left-hand side in assignment") - can be: 2.) The title starts as the extension id which doesnt happen with the extensions for frameless windows. So that can still be improved.
|
Interesting...I thought |
Ah I see
And here I thought after resulting in Should've RTFM ¯\_(ツ)_/¯ |
your work is superb! (while my commit i showed you had a bug & looked messy. ) |
[1] A quick fix for a recent commit (e6a15c5) for #1842
youtube/js&css/web-accessible/core.js
Lines 273 to 275 in ca19c6e
When the first query selector for
.custom-hamburger-menu
fails, there is an optional chaining (?.
) withremove
, but the()
comes after that, so it could be that it's trying to callnull()
with yields an error and the rest of the extension does not load...With the second selector, everything's fine until it could be
null.paddingRight
, which is a problem, but even with an?.
there, it can benull = '0'
, which is, of course, also an error, so you need a temporary variable to check for null before setting it to something:[2] Updated URL-less window popup from 7fbb43f
Removed the title from the event calls since the window title automatically gets overwritten when the page loads.
Fixed: the variable named
player
inplayer.js
to its correct name:ytPlayer
(noticed this because the opened window had 0 width & height xD).[3] Added URL-less popup window to playlist popup button
[4] Fixed video start-time of playlist popup
When the video opened is > 200th in the playlist, it uses the first video in the playlist (as expected), but it still has the same start-time as the initial video, so it could potentially skip to the end and immediately play the next, video for no apparent reason.
(now it removes the start time and video whenever that is detected).