question regarding loading
dearkafka opened this issue · 4 comments
Hi! First of all, great extension! thank you for doing it, and I really really appreciate your commitment (it's hard to maintain and respond to issues). I have a question, in my chrome there is still delay, in fact, 2:
- new page is loaded, I see reels block which disappears a little bit later (all settings are set to prevent this kind of thing). I suspect that this one might be due to unfinished loading of page. I wonder if anything can be made in this case. can extension not show facebook page at all before the reels are not hidden? Im ok to wait with blank screen some time.
- when I scroll facebook there are reels blocks which are not hidden but they become hidden in 2-3 seconds.
Hey,
Thanks :)
So one thing to check is the 5s load delay - make sure it is unchecked
The other cause is waiting on the facebook feed to be fully rendered so we can find it.
Ref: https://github.com/mrinc/F-B-Hide-Recommendations-and-Reels/blob/master/src/content/index.ts#L672
Ref: https://github.com/mrinc/F-B-Hide-Recommendations-and-Reels/blob/master/src/content/index.ts#L702
And that just takes a bit of time.... we could add a cover on the page so it's hidden and then is rendered - that is possible indeed.
The only thing we need to account for is the case where we cannot find the feed - ie: inner pages (not home page)
So we have to make sure we don't break standard use of FB.
We might have to do a URL test during load - if home page - then add cover else no cover.
If you can, push through a PR and lets have a look :)
Yea, I have a debounce set on the scroll events.
I know there was a fork that used html events, however I found some times that trying to run immediately caused some oddities with FB so I just kept it the original way - ref: https://github.com/mrinc/F-B-Hide-Recommendations-and-Reels/blob/master/src/content/index.ts#L706
But if you want to try optimize this, happy to see how it goes
the thing is I dont know js/ts stuff, I'm into python and backend languages so there is very little what can I help with. But as I see from other issues raised (although they are often with few details) I think that is what is pressing.
fork idea is quite good btw
So I cannot add a loader currently... code is there for future - but there needs to be a bunch of thought into it before we can do it.
I have sped up initial load of the plugin ... but can only speed it up so much ...
See how the new version is when it comes out and we can go from there re the speed.