Smart Google Reader Subscribe Button #
A few months ago, Jasper de Vries made a Greasemonkey script that places an unobtrusive feed icon in the upper-right portion of the screen, allowing two-click subscription to feeds that are encountered. Then, today I saw Pete's Greasemonkey scripts wish-list, which included on it a "You’re Already Subscribed To This" script. I figured it would be pretty easy to take Jasper's script and modify it to add this functionality.
My version of the script adds an overlayed check icon when you're subscribed to at least one of the feeds that the site advertises via auto-discovery. This was made easy by a URL that Reader exports: http://www.google.com/reader/api/0/subscribed?s=feed/<feed URL>
. It returns "true"
or "false"
depending on whether the current user (as determined by the Google Account cookie) is subscribed to the given feed.
There are a couple of caveats: The check is not foolproof - sites that use FeedBurner, that have changed their feed URLs since you've subscribed, or that available under different URLs (e.g. with or without www
) may not be detected correctly. Additionally, by its very nature, the script reports to Google Reader's servers all the feed URLs that it encounters. The extra-paranoid may not like this. However, an alternative approach (download the entire list of subscriptions, cache it, and use that for checks) would have meant a lot more coding on my side, more than I'm willing to do on a Saturday afternoon.
12 Comments
Excellent script, thanks a ton!
gm 0.6.4
allways the same error, something wrong?
http://danillonunes.com/public/userscripts/google-reader-subscribe.user.js
(Sorry for my english)
γιδω
Why don't you upload it to userscripts.org? This way it would be available to more people, could be tagged etc. I have this page in my bookmarks, but it looks strange that you keep it only on your blog. =)
Post a Comment