Hacker News new | past | comments | ask | show | jobs | submit login

@dang, if you're listening, an idea:

make the "upvote" buttons invisible on stories that the user hasn't visited before. This could be done like so:

    // css
    a.upvote-botton:visited { visibility: hidden };


    <!-- in html -->
    <a href="{article_link}" onclick="perform_upvote()" class="upvote-button">upvote triangle</a>

The href & onclick handlers would need to be added in javascript so as not to affect hn for non-js users.



That doesn't actually work in pretty much any browser, since it allows for history-mining by a malicious site. :visited styling changed a couple of years ago to only honor color changes, thus preventing most ways of exploiting that issue.

http://dbaron.org/mozilla/visited-privacy is one of the better resources explaining the issue more fully.

I guess you could create the triangle solely with CSS borders, and then style the border-color to be the same color as the background when not :visited


Could you not just render the anchor out of the view port and look at its color?


Ah, good catch. You would just do `color: white` then, no?




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: