XKit-Rewritten icon indicating copy to clipboard operation
XKit-Rewritten copied to clipboard

Seen Posts: Only register posts that appear on screen

Open marcustyphoon opened this issue 3 years ago • 0 comments

User-facing changes

  • Seen Posts does not treat posts rendered off-screen and never scrolled into view as "seen."

Technical explanation

As of the initial commit, this implements this exact behavior:

Posts are marked as seen if any part of the article element is visible for a continuous, uninterrupted 300ms interval.

This feels pretty good to me. (Initial commit contains testing-only visible behavior indicators; it is very hard to tell what's going on with them removed). It is somewhat overcomplicated, though, of course.

Removing the timers is an option to simplify this code significantly, though I would probably add a processing delay to attempt to run this code after post-hiding scripts complete. That is, after posts are hidden by other scripts, posts are marked as seen if any part of the article element is visible for any amount of time.

Issues this closes

resolves #592

marcustyphoon avatar Aug 16 '22 01:08 marcustyphoon