-
-
Notifications
You must be signed in to change notification settings - Fork 529
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 player.js slightly more readable autoplayDisable #2157
Conversation
keeping some references like i dont know if it is true. if it is true it can prevent somebody from thinking of undoing the change in future. |
I looked into this.
doesnt appear to be true right now. ImprovedTube.pageType() is reliably called very early in init and later on every page change. youtube/js&css/web-accessible/init.js Lines 115 to 116 in 7014a79
but maybe it wasnt there at the time?
How was this confirmed ? Logging both into console and catching bad case? or just "I changed this and videos pause reliably now so its probably it"? :) because pausing autoplay has been broken ever since #2042 (comment) Regardless at the end of the day all are same comparison anyway:
I would argue using pageType isnt much more readable nor faster. Maybe it should be left alone for just controlling CSS
speaking of which |
62a36d2
to
40aedd4
Compare
thank you @raszpl
Yay! Let's document if there is any reason not to keep it simpler (for people who didn't develop extensions) Extension-context vs. Web-accessible shouldn't distract. pageType() runs on youtube/js&css/web-accessible/init.js Lines 84 to 88 in 9266d8d
both run on youtube/js&css/web-accessible/init.js Lines 116 to 117 in 9266d8d
youtube/js&css/extension/init.js Lines 2 to 9 in 9266d8d
and both should alternatively run on every change of the URL bar |
|
This is cursed! 2
wont work, we are inside a play handler, video hasnt started playing yet so there is nothing to stop. |
No description provided.