Hacker Newsnew | comments | ask | jobs | submitlogin
trickjarrett 865 days ago | link | parent

Simple url filtering:

I know that we have to be careful how much we tax the servers for HN, but I thought of a simplistic and low-processing overhead for allowing users to block certain domains.

1) Allow us to input a list of domains we don't want to see links to.

Ex: csmonitor.com, godaddy.com, codinghorror.com etc.

2) Modify the item listings on the various listing pages to include a class that is the url's domain.

Ex: So if the link's url is http://x.com/asdfasdf the link listing would be class 'x.com'

3) Implement a basic css command generated on page load that adds our domains listed in part 1 and adds a 'display: none;' for them.

4) Win!

Obviously it's imperfect, you'll get less than the max items on a page, and users will notice numbers missing for the hidden links.




Lists | RSS | Bookmarklet | Guidelines | FAQ | News News | Feature Requests | Y Combinator | Apply | Library

Search: