One thing I’ve never liked about Hacker News comments is that you have to click through to a user’s profile page to learn anything about them.

Obviously, Hacker News isn’t the only site for which this is a problem, but since it’s one of the sites I visit most frequently, I figured I’d try to make an improvement.

I thought it might be helpful to see some of a user’s profile information attached to the comments themselves, so I whipped up a user script to do it.

The screenshot below shows the profile bars:

Screen shot 2014-05-03 at 7.43.58 AM

And here’s the user script:

One thing you’ll notice is that in an effort to be kind to the server, I’ve tried to minimize the number of times we actually fetch the user profile pages.

For instance, once we fetch a profile page for a user, we save the data using localStorage and insert the profile bar for each of the user’s comments on the page.

Then, if we encounter the user on another page (or lower down on the same page), we can just pull the data from localStorage, rather than doing another fetch. Granted, the lack of an expiration for the localStorage means we may persist stale data, but how often do people update their HN profiles, anyway?

I’ve had the user script running for about a week now, and it’s really nice to get immediate context about who’s posting.

I’ve tried out the user script in the lastest releases of Chrome and on Firefox, and it works well in both.

To install:

In Chrome:

1) Save the user script file to your computer. Make sure it ends in .user.js
2) Open the URL chrome://extensions
3) Drag the file and drop it to the extensions page

In Firefox:

1) Download the Greasemonkey add-on
2) Save the user script file to your computer. Make sure it ends in .user.js
3) From within your browser, open the user script file
4) You’ll be prompted to install the user script. Click “Install.”