GReader: The All-in-One Safari 5 Extension for Google Reader

Current Version: v2.04

The GReader extension is for Safari 5.0 or later. I based this off of my previous GReader-Checker extension and made it to become a complete Google Reader extension.

What GReader does:
- Updates a toolbar icon when there is a new feed item in Google Reader.
- This updates you on your total unread count.
- Enables “Add to Google Reader” functionality to add an RSS feed to Google Reader when the RSS icon is clicked upon in the address bar.
- Direct feed integration into Google Reader and bypasses any hoopla needed to add the feed to your Reader.
- Adds many options for update interval from as frequent as 5 seconds to as infrequent as 1 hour.
- NEW in v2.02: GReader now switches to open Google Reader tab if open, or creates a new one if one isn’t open.
- NEW in v2.03: Code optimized
- NEW in v2.04: Open GReader in current tab if on blank or Top Sites. Special thanks to Nicholas Helke (@nHenke on Twitter) for his patch.

Why should you use GReader?
- It works
- It’s pretty
- It has more options than others out there
- It’s even better than GReader-Checker

To do list for future GReader releases:
- Customizable Google Reader styles
- Complete integration with Google Reader
- Give the best possible user experience for Google Reader on Safari 5
- Become the most functional Google Reader extension for Safari 5

Download GReader v2.04

Google Code Repository: (for reporting problems, mirror for old releases)

How to Install:
Enable Safari Extensions, uninstall the previous GReader-Checker extension from the preference pane and then double click to install the extension after downloading.

Changelog:
v2.04 – June 16, 2010
- Open GReader in current tab if on blank or Top Sites. Special thanks to Nicholas Helke (@nHelke on Twitter) for his patch.

v2.03 – June 15, 2010
- Optimized code. No fixes.

v2.02 – June 11, 2010
- GReader now switches to open Google Reader tab if open, or creates a new one if one isn’t open.

v2.01 – June 11, 2010
- minor code fixes

v2.00 – June 10, 2010
- first release
- complete Google Reader extension
- based on GReader-Checker

{ 40 comments… read them below or add one }

1 Chris June 10, 2010 at 12:44 pm

Loving this extension, thanks a lot!

Quick request – is there any way that it could check if you already have Google Reader open in a tab and if so, switch to that instead of opening a second tab? That would be awesome!

Thanks again.

2 rafeed June 10, 2010 at 12:46 pm

Hey Chris,

Thanks for the comment. I’ll look into adding that feature. It’s a good request.

I’m glad you like the extension!

3 Nerdwerk June 10, 2010 at 2:24 pm

Great S-Ex!

My feature request: I would like to have the option in the preferences to set my own hotkeys (shortcuts) for open Google Reader and add a feed or site.

4 Brady June 10, 2010 at 4:48 pm

Hi, I love your extension! It’s amazing what people have done in only a few short days. One suggestion: I’m currently using another extension called “Google Reader Background Tabs v1.1″ to force the ‘v’ keystroke in Google Reader to open feed items in background tabs. It’d be awesome if you could build this functionality into your extension as well! Let me know what you think…!

5 rafeed June 10, 2010 at 4:56 pm

@Nerdwerk,
Thanks, Nerdwerk. I’ll try to do that, but no guarantees. I’m still learning this, but will try to figure it out. It might be available in a future release.

@Brady,
Thanks for your comments, I really appreciate it. I’ll see what I can do to include similar functionality in the options page.

Thanks everyone for your support!

6 Mikhail June 10, 2010 at 10:44 pm

Hey cool up but since the moment its installation, Safari began to crash constantly. Just saying maybe there is an error in the code?

7 Mirza June 10, 2010 at 10:56 pm

GREAT WORK!

2 small suggestions:

a) When safari opens with a new empty tab, gmail reader still opens a new tab next to this (altough it could use the current open empty tab)

b) If the Reader is already open in some tab and i click the reader icon again, it will open a new tab instead of jumping to the existing tab an maybe refreshing it.

other than that: great great work for so short time :)

8 rafeed June 10, 2010 at 11:10 pm

@Mikhail,
Thanks for the feedback. It wasn’t crashing for me, but I found some areas I could tweak the code so I updated GReader to v2.01 with minor code fixes. Maybe that will fare better for you?

@Mirza,
Thanks for the feedback. For the first request, right now I haven’t found a way to make it open in the same tab if there is no URL. It is on my to do list to get it to do that though. For the second request, I’ve been working on it, so expect an update that does that pretty soon.

9 rafeed June 10, 2010 at 11:14 pm

For those of you who have version v2.00 installed, you can simply go to your Safari Extensions Preference Pane and should see the update for v2.01 if you do not have “Install updates automatically” checked.

10 mat June 11, 2010 at 9:11 am

thanks for the plugin!
but how can i automatically add feeds (feed://) to google-reader?

11 rafeed June 11, 2010 at 9:37 am

@mat,
No problem. I’m not sure what you’re asking, but if you’re saying you’re on a website and would like to add its feed to Google Reader, just click the “RSS” button in the address bar, next to the refresh arrow, for sites that have an RSS feed set up. It should automatically take you to Google Reader to add your feed. I’m not sure there’s a way to subscribe to the feed as well with the click of a button, but I’ll look into it.

12 rafeed June 11, 2010 at 7:00 pm

GReader has been updated to v2.02 which supports switching to an already open Google Reader tab.

13 Paolo June 12, 2010 at 9:07 am

Hi. GReader rocks, but there is a minor annoyance: it doesn’t work well with the new Safari Reader overlay.

Try it on this url, for example: http://edition.cnn.com/2010/TECH/social.media/06/11/new.york.times.tweet/

If your extension is enabled then [ Reader ] is shown during loading (but it doesn’t work). When the load is complete, [ RSS ] takes its place, and clicking it goes to GReader as wanted.

I am not sure what the best behavior is, but I think Safari Reader shouldn’t be completely disabled.

14 rafeed June 12, 2010 at 10:31 am

Hey Paolo,

Thanks for your feedback. Actually, it’s not my extension that’s the problem. My extension doesn’t remove the [Reader] functionality. It only changes the [RSS] functionality. If you disable my extension, and load the site again, you will see that the [Reader] switches to [RSS] when clicked. This is a bug in Safari for when there is a short article, it cannot create a [Reader] canvas like on long articles. Try a different site and you will see that the [Reader] still works as expected.

Rafeed

15 Paolo June 12, 2010 at 11:55 am

I see. Thank you for the informations Rafeed.

16 Andrew June 13, 2010 at 12:42 am

Just so you’re aware, it doesn’t work properly when subscribing to flickr feeds. It always tries to subscribe to the “all uploads by everyone” feed instead of that particular user’s feed of photos. Just a small glitch. Other than than, it’s a wonderful extension!

17 rafeed June 13, 2010 at 8:15 am

Hey Andrew,

Thanks for finding that out! I’ll try to figure out why that’s happening.

Rafeed

18 Simon June 13, 2010 at 10:10 am

Hi rafeed

A neat little extension.

I find the v2.0.2 button loses its graphic when I move its position on the toolbar. Gone back to v2.0 which works OK.

Regards
Simon

19 rafeed June 13, 2010 at 10:17 am

Hi Simon,

Thanks for the feedback. I’m not sure why v2.02 loses its graphic for you. I am using v2.02 and haven’t had the problem after I tried it again just now. It may be another extension that’s doing that, but I’ll look into it.

Rafeed

20 Simon June 13, 2010 at 12:11 pm

rafeed

Re-installed v2..02 and its OK. Obviously my set up caused the problem. Happy again.

Simon

21 Scott June 14, 2010 at 3:18 pm

I’m loving the GReader extension. Really nice work. Any chance you could add a new option to have Google Reader load in the current tab when the GReader toolbar button is clicked, as an alternative to the current behavior of opening in a new tab?

22 rafeed June 14, 2010 at 4:46 pm

Hey Scott,

Thanks for your feedback. I’ll try to take a look and see if I can add that in. For now, though, bear with the new tab.

Rafeed

23 Scott June 15, 2010 at 5:09 am

Great, and thanks for the quick reply.

24 Elisa Marlet June 16, 2010 at 2:56 pm

This is neat. Thanks for putting it together. I was reading through the Safari docs and did not see reference to intercepting the click on RSS icon. Are you using a clever trick? Thanks

25 rafeed June 16, 2010 at 7:08 pm

Basically, the RSS icon comes up when there’s a feed:// for the site. When you click on the RSS icon, it just takes you to that link, so what I did was take that link and append it to the google reader link.

26 Elisa Marlet June 16, 2010 at 11:41 pm

Ah I see. Clever. Do you use a content script to detect that a feed:// URL is about to load?

27 scott June 17, 2010 at 5:13 am

Love the tabs behaviors in 2.04.

28 Edwin Khodabakchian June 17, 2010 at 10:22 pm

Hi Rafeed. I am one of the developers of feedly. I had the same question as Elisa: how do you intercept feed://? Do you have a start content script for feed://*/*? Thanks. Edwin

29 rafeed June 17, 2010 at 10:40 pm

@ Elisa and Edwin,

Thanks for your comments. Yes, I used a start content script. I injected the following:

document.addEventListener("beforeload", addToGreader, true);

function addToGreader(event) {

if ( /feed:\/\//.test(event.target.ownerDocument.URL)) {

window.location = 'http://www.google.com/reader/view/feed/' + encodeURI(event.target.ownerDocument.URL.replace('feed://', 'http://')); }

}

I hope it helps.

Rafeed

30 Edwin Khodabakchian June 18, 2010 at 11:34 am

Thanks. this is helpful. One last question: how to you “register” the start content script? I tried to add a content script with the whitelist feed://*/* but safari does not seem to call me back. Where do you include “document.addEventListener(“beforeload”, addToGreader, true);”

31 rafeed June 18, 2010 at 12:03 pm

Did you allow access for all sites for Extension Website Access? You also need to blacklist http and https links where you call the start script.

The code I posted earlier is by itself the .js to be injected.

Rafeed

32 Mark Weist June 21, 2010 at 11:43 am

Ready for a stupid question? I have done all the enabling work. But when I download an extension nothing I have tried puts the extension in the Preferences > Extensions pane. I’ve double-clicked, dragged the extension into the pane, etc. I must be doing something wrong. Can you redirect me?

Thanks.

33 Luis Rodriguez June 28, 2010 at 4:05 pm

Hi Rafeed,

I’m quite impressed not only for the speed in the preparation and correction of this extension, but also for the contact you keep with everybody, answering to almost all the comments, and taking them into account.

I like pretty much your to-do list. There is one point I don’t know if it’s included in it, but I would be very thankful if so. It’s to add the possibility to connect to the reader through the https connection.

Congratulations for your great job!

Thank you for sharing this extension with us,

Luis

34 rafeed June 28, 2010 at 11:51 pm

@ Mark- Sorry it took so long to get back to you. I’ve been very busy the past few days. I’m not really sure what seems to be your problem. Hopefully you got it figured out by now, but if you haven’t let me know and maybe I can help.

@ Luis – Thanks for your message. I really appreciate it. I’ve gotten a few emails to include https in GReader, and I’ll try to incorporate it into the next release of GReader.

35 Filipe Guimarães July 10, 2010 at 4:15 pm

It seems great! Thanks a lot!

36 Alex Vizzini July 22, 2010 at 10:21 am

Is there away to stop it from automatically updating when I close and open my browser? I want it to update every 1hr no matter what.

37 Scott Rose July 26, 2010 at 9:21 am

Thanks soooo much for your excellent work on this Safari extension! I love it, and it is exactly what I was looking for!

I’ve got GReader set to update every hour, except it seems to update on its own every time I open up a new browser window. Is there any way to delay its updating to really take place only every hour, instead of every time I open up a new browser window?

Thanks again,
Scott

38 G. Kyle Essary July 28, 2010 at 3:32 am

Let me second the request to stop it from updating automatically when you open a browser window. It would be absolutely perfect if it didn’t automatically check at startup as well! Other than that the extension is great.

39 Belinda August 2, 2010 at 10:35 am

I love this! Thank you so much!

40 santiago August 17, 2010 at 4:47 pm

i don’t test yet

Leave a Comment

{ 14 trackbacks }