|
|
|
|
|
by LAC-Tech
1274 days ago
|
|
Yeah, HN is such a double edged sword. Great technical discussions as well as time sucking passive aggressive discussions about "divisive social issues", which I cannot help but click. Wrote this script today, that just stops me seeing submissions from sites I know won't have good technical discussions. Might be useful for others. const boringDomains = ["twitter.com", "newyorker.com", "nytimes.com"]
Array.from(document.querySelectorAll(".titleline > a"))
.filter(elem => boringDomains.some(domain => elem.href.includes(domain)))
.map(elem => elem.parentElement.parentElement.parentElement)
.flatMap(elem => [
elem,
elem.nextElementSibling,
elem.nextElementSibling.nextElementSibling]
)
.forEach(elem => elem.remove())
|
|