Skip to content
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

Sponsorblock chapters support #9

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

Informatic
Copy link
Member

Fixes #8

Segments still disappear randomly, we likely have some race we need to fix up.

@fire332
Copy link

fire332 commented Dec 29, 2021

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.

image

@Informatic
Copy link
Member Author

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.

@fire332
Copy link

fire332 commented Dec 29, 2021

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.

@Informatic
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SponsorBlock segments not rendered on videos with chapters
2 participants