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

[FEAT] Override elements after they appear in DOM but before being drawn onscreen #53

Open
aclist opened this issue Jul 10, 2023 · 0 comments

Comments

@aclist
Copy link
Owner

aclist commented Jul 10, 2023

If you take a look at the mutation observer logic for infinite scroll, we're able to apply the mods as soon as the DOM changes, effectively preventing the default appearance from loading (e.g. upvotes/downvotes). This is seamless and allows the new content loaded in to already have the mods applied, so you see none of the old content blink in and then get overwritten.

In theory, this should be possible to do on initial page load, too, so we don't get that blink effect. It's going to be a bit tricky to do correctly due to the fact that we are setting up so much content at the beginning and have to test which mods are applied before walking through them, so the window of opportunity is kind of small, but it could work. And this tends to function more seamlessly by hiding/inserting directly with CSS

@aclist aclist changed the title Override elements after they appear in DOM but before being drawn onscreen [FEAT] Override elements after they appear in DOM but before being drawn onscreen Jul 10, 2023
@artillect artillect mentioned this issue Jul 12, 2023
37 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant