News for hackers. Stuff that matters.
Re:Show HN: No Feed? Unlimited Productivity by zukerpie on Friday October 20, 2023 @04:23PM (#37961078)
This is just the straightforward idea of waiting for some element to appear on the website. But once the element is found, this thing stops. It won't stop for YouTube if you are on Facebook though but it's just a first implementation and it could actually be very easy to recognize the site. Thanks for the helpful suggestion!
Re:Show HN: No Feed? Unlimited Productivity by rendall on Friday October 20, 2023 @07:24PM (#37962608)
I wrote an extension that did something similar for Twitter, back when Twitter had "So-and-so liked this" tweet, which was inevitably something awful. It's archived now, because it's no longer relevant. But you might find something useful in the code.

I tried polling, but it was against the Chrome extension guidelines at the time, so I used a "mutationObserver" on page load and then a "scrollListener". I don't remember if I ever tried an "intersectionObserver" but that might be worth looking at.

https://github.com/rendall/twitter-like-hider/blob/master/co...

Re:Show HN: No Feed? Unlimited Productivity by joshxyz on Saturday October 21, 2023 @12:19AM (#37964038)
hey just curious, can't the mutationobserver catch this instead of that approach?

https://developer.mozilla.org/en-US/docs/Web/API/MutationObs...

Re:Show HN: No Feed? Unlimited Productivity by zukerpie on Saturday October 21, 2023 @06:24AM (#37965579)
Definitely! The current implementation is supposed to just do the work. It's not meant to be optimized or anything.