News for hackers. Stuff that matters.

Tell HN: script to hide Apple-related news

Some people were complaining about the amount of Apple-related posts today, so I whipped up a quick script to hide them.

GreaseMonkey http://userscripts.org/scripts/show/73977

Bookmarklet

  javascript:(function() {var as=document.getElementsByTagName("a");for(var i=0;i<as.length;i++)if(as[i].innerHTML.match(/Apple|Steve Jobs|iPhone|iPad|Gmail|Google/gim)){var tr=as[i].parentNode.parentNode;tr.style.display="none";tr.nextSibling.style.display="none";tr.nextSibling.nextSibling.style.display="none"}})()
( 4 comments | 11 points | on HN )
Re:Tell HN: script to hide Apple-related news by nkm on Friday April 09, 2010 @06:24PM (#1254067)
Thanks but, ¿why it also hides Google and Gmail related news?
Re:Tell HN: script to hide Apple-related news by lhorie on Friday April 09, 2010 @07:34PM (#1254179)
That's just me scratching my own itch. I find that "my-opinion-about-whatever-Google-happens-to-be-doing-at-the-time" type of news tend to flood the front page every once in a while. Perhaps Google|Schmidt would be a better filter? You're free to edit the regexp to suit your tastes, if you want different keywords to be filtered.
Re:Tell HN: script to hide Apple-related news by lhorie on Friday April 09, 2010 @08:35PM (#1254278)
update: I changed the Apple script to handle Apple exclusively and added a few more similar greasemonkey scripts here:

http://userscripts.org/users/148096/scripts

(it seems we can't pass arbitrary params to greasemonkey, boo)

Re:Tell HN: script to hide Apple-related news by oomkiller on Saturday April 10, 2010 @03:32AM (#1254719)
Hmm, I wish HN had a switch that would allow you to hide things you don't wish to see.