javascript కోసం సమీక్షలు
javascript ద్వారా chee
991730 ద్వారా సమీక్షించండి
Rated 4 out of 5
by 991730, 4 సంవత్సరాలు క్రితంIt's a nice addon. If only it worked on every page... I wrote a small utility script for Youtube. The script runs when it's a freshly opened Youtube tab, but not if a new video was loaded via autoplay. I'd really like to know why. (note that I also have this issue with other JS scripting addons).
డెవలపర్ స్పందన
posted 4 సంవత్సరాలు క్రితం:) thanks for the review.
it doesn't work on autoplay videos because it's just a script tag injected into the page. an autoplaying video doesn't load a new page, youtube's javascript does a request and replaces the video element in the dom (and a lot of other elements ^_^).
i don't know how much JS you know, but you might be able to implement something as a callback to a mutation observer: https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
:)
it doesn't work on autoplay videos because it's just a script tag injected into the page. an autoplaying video doesn't load a new page, youtube's javascript does a request and replaces the video element in the dom (and a lot of other elements ^_^).
i don't know how much JS you know, but you might be able to implement something as a callback to a mutation observer: https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
:)