News for hackers. Stuff that matters.

Hacker News Chrome Extension

https://chrome.google.com/extensions/detail/geancnifhbkbjijfkcjjdnfemppmcjmk

I just finished up a simple Hacker News extension for Google Chrome. It allows you to view the front-page stories as well as submit your current tab. Let me know what you think and I'd like to hear your ideas for future updates.

The source code can be found here: http://github.com/adamalbrecht/hacker-news-for-chrome

( 31 comments | 59 points | on HN )
Re:Hacker News Chrome Extension by adam_albrecht on Friday March 05, 2010 @10:40PM (#1171109)
I just finished up a simple Hacker News extension for Google Chrome. It allows you to view the front-page stories as well as submit your current tab. Let me know what you think and I'd like to hear your ideas for future updates.

The source code can be found here: http://github.com/adamalbrecht/hacker-news-for-chrome

Re:Hacker News Chrome Extension by acangiano on Saturday March 06, 2010 @01:13AM (#1171214)
Nice job. I find it particularly useful when I want to open up a bunch of links I'm interested in without the need to right click.
Re:Hacker News Chrome Extension by sparky on Saturday March 06, 2010 @01:39AM (#1171232)
Ctrl+Click (open in new tab) and Shift+Click (open in new window) work well too, if I'm understanding you correctly. If not, my apologies :)
Re:Hacker News Chrome Extension by acangiano on Saturday March 06, 2010 @02:02AM (#1171244)
You understood me correctly. However, ctrl+click still involves two input devices. :)
Re:Hacker News Chrome Extension by dmnd on Saturday March 06, 2010 @02:31AM (#1171264)
If you have a scroll wheel on your mouse, middle-click opens a link in a new tab using only a single input device.
Re:Hacker News Chrome Extension by Hexstream on Saturday March 06, 2010 @09:29AM (#1171565)
Simultaneous left+right click counts as middle click for me on Ubuntu, I'm not sure if it's like that everywhere. So maybe you don't even need a scroll wheel.
Re:Hacker News Chrome Extension by messel on Saturday March 06, 2010 @04:16AM (#1171356)
The things you learn about peripherals here. I've been right click new tabbing for years.
Re:Hacker News Chrome Extension by ximeng on Saturday March 06, 2010 @07:30AM (#1171451)
You can set up laptop touchpads to have a middle-click zone for one tap opening of new tabs too.
Re:Hacker News Chrome Extension by statictype on Saturday March 06, 2010 @12:58PM (#1171848)
You can also middle-click on a tab to close it. Works in both Chrome and Firefox.
Re:Hacker News Chrome Extension by adam_albrecht on Monday March 08, 2010 @10:03AM (#1175432)
I'm just trying it out in Windows for the first time (on my work PC) and I realize that it works a little better on my Mac. On the mac version of Chrome, when you click on a link within the extension popup, it opens up a new tab in the background and leaves the popup open. But in the Windows version, the popup closes every time you click a link. That's annoying.... I'll look into it later.
Re:Hacker News Chrome Extension by Timothee on Saturday March 06, 2010 @03:09AM (#1171294)
One thing I could see useful is to get to comments for your current tab. Let's say you're reading something and you would like to see if there's any discussion around that on HN and if so, get to it. If not, get the option of submitting it.

I also remember that there was a bookmarklet that was adding links for each story to open a split window with the article on the left and the comments on the right. I liked it, though I lost it and never really looked for it.

Re:Hacker News Chrome Extension by tdupree on Saturday March 06, 2010 @09:52PM (#1172776)
This isn't quite splitview, but you might find my Hacker News OnePage extension for chrome useful.

https://chrome.google.com/extensions/detail/plldnnbdlbgbiknj...

Re:Hacker News Chrome Extension by ananthrk on Saturday March 06, 2010 @08:14AM (#1171487)
Regarding the split view, did you mean http://nirmalpatel.com/hacks/splitview.html ?
Re:Hacker News Chrome Extension by nirmal on Saturday March 06, 2010 @08:22AM (#1171497)
Unfortunately, the page that frames the article and comments side-by-side is throwing a 403 and I don't know why. Still debugging...

The page works when I launch it locally but not when it is on my host. I put in a support request.

[EDIT : 9:05AM] Fixed. You will need to reinstall the user script at http://nirmalpatel.com/splitview/splitview.user.js It works in Safari, Chrome and FF on my Mac. Time for my mid-morning nap.

Re:Hacker News Chrome Extension by megamark16 on Saturday March 06, 2010 @09:16AM (#1171553)
I think what he's asking for (if I understand correctly) is a way for the plugin to check the page I'm currently on, say it's a mixergy blog post or something, and determine if that blog post has already been submitted to HN and if there are any comments about it. That would be sweet, that way I'd know right away without having to google search (site:news.ycombinator.com) for the url, and if there' already a thread I can join in the discussion quickly.
Re:Hacker News Chrome Extension by pavs on Saturday March 06, 2010 @11:50AM (#1171736)
To be more specific. Something like this; http://www.reddit.com/tb/b9yyc
Re:Hacker News Chrome Extension by Timothee on Saturday March 06, 2010 @12:44PM (#1171829)
In the second part I was talking about the split view. In the first part I was talking about what you're describing.
Re:Hacker News Chrome Extension by adam_albrecht on Saturday March 06, 2010 @11:16AM (#1171685)
I would love to do something like that, but I don't think Hacker News provides any sort of API for accomplishing this. I'll look into it, though. Thanks!
Re:Hacker News Chrome Extension by statictype on Saturday March 06, 2010 @01:01PM (#1171851)
Possibly better way to do it is to make a content script (or a greasemonkey script - same thing?) that rewrites links in HN's page such that when you open them in a new tab, you can keep track of the corresponding comments link, and then provide a Page Action that shows up in the location bar, clicking on which, will open up the comments page for the link.

This won't work where you directly happen to go to a site that was also on HN, but will work for the 80% use-case where you are going to a site from the HN front page itself.

Re:Hacker News Chrome Extension by Timothee on Saturday March 06, 2010 @12:52PM (#1171837)
This is not the best place to talk about that but:

As far as I know, HN doesn't have this capability indeed. However the script could scrape a certain number of the pages (it goes up to seven). You can easily match the linked URL with the current URL. I believe a Chrome plugin can have a list of remote sites it can do XmlHttpRequest on, no?

Re:Hacker News Chrome Extension by rafd on Saturday March 06, 2010 @01:25AM (#1171222)
Awesome! ...but passing on this for the sake of my productivity, for now.
Re:Hacker News Chrome Extension by vijaydev on Saturday March 06, 2010 @03:37AM (#1171312)
second that :)
Re:Hacker News Chrome Extension by char on Saturday March 06, 2010 @02:34AM (#1171265)
I'm really excited about this.

Also, the 'Submit Current Page' feature seriously just increased the chances of me actually submitting things.

Re:Hacker News Chrome Extension by vijaydev on Saturday March 06, 2010 @03:38AM (#1171315)
I use http://ycombinator.com/bookmarklet.html, but this looks good too!
Re:Hacker News Chrome Extension by rogermugs on Saturday March 06, 2010 @08:10AM (#1171485)
i'm not sure you really understand what the extension does
Re:Hacker News Chrome Extension by mbrubeck on Saturday March 06, 2010 @10:07AM (#1171597)
It does the exact same thing as the bookmarklet, as far as I can tell.
Re:Hacker News Chrome Extension by cj on Saturday March 06, 2010 @10:38AM (#1171633)
The bookmarklet only allows you to submit pages.

This extension displays the top 15 HN stories, gives links to them, and also gives a link to each of their comment pages.

Re:Hacker News Chrome Extension by mbrubeck on Saturday March 06, 2010 @12:10PM (#1171765)
Yeah, I'm using it. I was replying specifically to the comments in this thread about the "Submit Current Link" feature making it easier to post links. Sorry for being unclear.
Re:Hacker News Chrome Extension by krainboltgreene on Saturday March 06, 2010 @02:46AM (#1171272)
I would honestly get rid of the numbering and give each list item:

border-style-bottom: solid

Re:Hacker News Chrome Extension by adam_albrecht on Saturday March 06, 2010 @11:23AM (#1171693)
I agree that the numbers are pretty useless, but I decided to keep them to match the Hacker News theme. Maybe in the future, I'll add a second theme and let you choose between them in the options. Thanks for your input.
Re:Hacker News Chrome Extension by pibefision on Saturday March 06, 2010 @06:54AM (#1171430)
I love it!. Thanks!