youtube-webos
youtube-webos copied to clipboard
Sponsorblock chapters support
Fixes #8
Segments still disappear randomly, we likely have some race we need to fix up.
Question: why are you polling the DOM for the progress bar instead of using a MutationObserver? You already use one in another part of your code and it is natively supported by the lowest WebOS chromium you support.
Additionally, I found an infinite loop which keeps hitting console.info('bringing back segments overlay');
when I try to use the cursor to click on the progress bar. Highlighted element is what n
and this.segmentsoverlay
is set to in the infinite loop. Verifiable with magic cursor and with PC mouse in Chrome inspector.
Yeah - that is a fairly good point. Mostly because I originally didn't use MutationObservers, and added support for that only when it turned out to be actually important. Want to take a stab at this? Otherwise, I hope to be able to find some time to clean this up before new year.
I'll take a look at it but my current suspicion is that whatever they're using for their virtual DOM doesn't like scripts externally modifying what it controls.
Heh, I wasn't even aware there could be any virtual DOM implementation that wouldn't discard every element that's not under their control.