Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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())


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: