metafizzy / infinite-scroll

📜 Automatically add next page
https://infinite-scroll.com
7.41k stars 1.74k forks source link

[Question] Edit new items before appending into container #907

Closed ghost closed 3 years ago

ghost commented 4 years ago

Is it possible to edit nodes before appending them to their parent container? I'm trying to implement infinite-scroll via userscript on a image board but the newly added items come with a class that hides them by default for whatever reason.

I could override the css rule via javascript instead of editing the items themselves but I would rather find a solution that doesn't alter the source code since it might break other functions.

I could call a function on append checking for newly added items but I fear it might rapidly become resource intensive once hundreds or thousands of new items are added to the container.

Is it possible to do this on the fly without checking all the previously added items?

yaayesita commented 4 years ago

Cómo empii