Ten years ago, on March 13, 2013, Google said it was discontinuing Google Reader, a popular application for reading RSS and Atom feeds.

Google’s decision to do so, part of a corporate initiative dubbed “Spring Cleaning,” proved vexing enough to prompt a petition to save the application, though to no avail. The web app, launched in 2005, was shut down on July 1, 2013, due to declining use, the company claimed.

Based on the quick and simple development of the Deviantart Chrome Extension, I’ve decided to make a quick extension that pulls the feeds of a site that I’m visiting. Using jQuery, it looks in the HTML of the page for any <link rel="alternate" ... tags, and if any is found, is added to a layer at the bottom left part of the page. It will colour differently the RSS, JSON and Atom links, depending on the feed type.

If you want to use it straight away, download the archive below, unpack it and drag the folder over a Chrome window that is pointed at: chrome://extensions

💾

RSS Feed Buttons Chrome Extension

rss-feed-buttons.zip (v0.1.2 — 36 KB)

Because I didn’t need too much, the code is straightforward and all is dumped into a single Javascript file:

  1. Added jQuery. I added version 3.5.0, because I had that on my site and it was the easiest to copy and paste.
  2. Read the HTML for the <link rel="alternate" ... type of links
  3. *Get the link info (href, title, type) and output the buttons.
  4. The last step was to add some CSS rules in the styles.css file, to make the output box and the buttons look pretty and set their position in the bottom left part of the page.
1
2
3
4
5
6
7
buttons = '';
jQuery('link[rel="alternate"]').each(function(){ 
	if(jQuery(this).attr('type') != null) {
		buttons += '<a target="_blank" href="'+jQuery(this).attr('href')+'" title="'+jQuery(this).attr('title')+'" class="'+jQuery(this).attr('type').replace("application/", "").replace("+xml", "")+'">'+jQuery(this).attr('type').replace("application/", "").replace("+xml", "")+'</a>';
	} 
});
$("body").prepend(jQuery("<div id='feed-boxes'>").html(buttons));

Changelog

Version 0.1.12023-08-13 — Links with attribute rel="alternate" are now checked against attr('type') to exclude links towards mobile/AMP.

Version 0.1.22024-08-07 — Modified the attr('type') to check for null rather than an empty string, to generate less errors.

Chrome Extension output

And that’s it! :)