by abtinf · 3y ago · 0 comments
There are some prolific users who… while their comments are of normal quality, trigger a strong desire for me to respond. I’d rather simply not see their comments (and reply trees) at all.
If you want to roll a quick version of your own, once you've identified rows containing comments you want to block, you need to hide all subsequent rows which have a higher indent. I see there's now an "indent" attribute in the DOM which would make this even easier.
[1] https://github.com/insin/comments-owl-for-hacker-news#commen...
const boringPeople = [/* omitted */]
Array.from(document.querySelectorAll('.hnuser'))
.filter(elem => boringPeople.some(person => elem.textContent === person))
.map(elem => elem.parentElement.parentElement.parentElement.parentElement)
.forEach(elem => elem.remove())
This worked to block the actual comment but not the whole thread.