Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sterlind
· 2y ago · 0 comments
how does collapse work then?
Comments
[–]
kijin
2y ago
Loop over next siblings and hide them one by one, until you hit an entry with an indentation level that is less than or equal to that of the current entry?
[–]
refset
2y ago
Take a look at the kidvis function in hn.js
[–]
archgoon
2y ago
It iterates across sibling comment elements, hides them, until it encounters one whose indent level is less than or equal to the initial indent level.
[–]
sterlind
OP
2y ago
that makes sense. you're shadowbanned by the way, I had to vouch for your comment.