Modern browser won't let you change :visited selector except color... because of security.
A random webpage would have the knowledge of pages you have visited then :) I think IE7 and below have that bug. And you can't check the color of a visited link with javascript.
You were able to build a list of controversial webpages (to compare them with my browser history), put to your css file that a:visited color: red; (just an example) and check with javascript which links have foreground color red - and voilaa. You know what pages I have in my history.
You need to save data to localstorage or something like that instead. And you can only save those clicks which are made from hackernews site... not populate it from browser history.
But you can't identify which links are visited... because of security issues I described. Sorry my english is horrible maybe I described it very in a very bad way.
You can't with javascript, but the a:visited selector works in pure CSS, doesn't it? I'd like to do it so that I don't know which links you actually visited, but you would see them in a different color anyway. I think this should work somehow, I'll have to make some more tests.