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

Thanks for the feedback.

It could be possible to mark individual items read, but hiding the ones you actually clicked on (without marking them read) is unfortunately impossible: As pointed out somewhere else in the comments, with javascript you can't read the "visited" selector, and with only css I could perhaps hide just the visited link, but not the encasing and trailing TR.



I figured out another way you can hide links as they are clicked.

With jQuery override the .click() event of every link on the page. Then, when the link is clicked get the URL of the link from the event parameter that is passed to .click(). From that information, you can construct a CSS selector like this one (with jQuery)

$("a[href=\"http://stackoverflow.com/questions/10668292/is-there-a-setti...)

Which can then be used to hide the clicked link. The problem now is one of persisting the data between sessions. Your options are localStorage, remote storage, and my suggestion: sqlite in webkit a'la: http://stackoverflow.com/questions/6200976/sqlite-in-chrome

After you have saved the "read" urls in SQLite, you should be able to hide the surrounding data as well in the other <tr> tag by traversing the DOM with jquery.

I really would love if you did this. Please consider giving it a try.


It looks like I should have done better markdown formatting on my selector example. For clarity:

    $("a[href=\"http://stackoverflow.com/questions/10668292/is-there-a-setting-on-google-analytics-to-suppress-use-of-cookies-for-users-who\"]")




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

Search: