Hack #85. Automatically Display Unread Items in Bloglines

Bloglines already defines a function to display unread items. Save yourself a click and call it automatically.

Bloglines (http://www.bloglines.com) is a web-based aggregator for syndicated feeds. It has a two-pane interface; the left pane displays your subscriptions, and the right pane displays the content from those subscriptions. The only thing I dislike about this nice interface is that I always use it the same way: every time I visit Bloglines, I want to see everything I haven't seen before— that is, all the unread items.

In Bloglines, displaying all unread items is just one click away. Clicking on the root level of your subscriptions in the left pane displays the unread items in the right pane. But since I always want to do this, I wrote a user script to automate that one click.

The Code

This user script runs on Bloglines. Since Bloglines already defines the JavaScript function we want to call to display unread items, the script is simply one line of code. There's one little wrinkle: Bloglines uses frames, so this script will end up being executed on each frame. Only the top frame defines the function we want to call, so we simply check whether it is defined before calling it.

Save the following user script as bloglines-autoload.user.js:

 // ==UserScript== // @name Bloglines Autoloader // @namespace http://diveintomark.org/projects/greasemonkey/ // @description Auto-display unread items in Bloglines // @include http://bloglines.com/myblogs* ...

Get Greasemonkey Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.