- Using the JavaScript Intersection Observer may be an interesting addition, as this would explicitly differentiate comments on the thread which you may not have scrolled down to.
- Using the JavaScript Intersection Observer may be an interesting addition, as this would explicitly differentiate comments on the thread which you may not have scrolled down to.
https://greasyfork.org/en/scripts/423969-hn-style-unread-con...
It uses IntersectionObserver for "exposition watch" and "crypto.subtle.digest" for SHA-1 hashes - I was pleasantly surprised those native APIs are enough to get this magic working.
It's very POC-ey (absolutely no checks for storage capacity etc) but works quite well for me.
E: Actual markers are just light green right borders on "unread" items that slightly fades out after "exposition timeout". I'm using dark userstyle for HN (https://uso.kkx.one/style/71155 ); in default theme they are probably too light to be visible.
I love one-thing-well items of code instead of large (and thus non-secure) abstractions built upon other abstractions. Big fan of the K.I.S.S principle https://en.wikipedia.org/wiki/KISS_principle