mckinley.cc Home Blog Computers

Bringing Back a Useful Browser Feature With a Bookmarklet

September 22nd, 2022

The developers of our favorite Web browsers have an annoying habit of removing useful features while continuing to add countless features that people don't need or want. One example of this is the removal of support for handling <link rel="alternate"> for RSS and Atom feeds in Firefox and Chromium. Today, we're using a bookmarklet to put a list of available feeds at your fingertips.

This post is the third in my series about bookmarklets. The other posts are linked below.

  1. An Acceptable Use for JavaScript
  2. Defining a Favicon for a Bookmarklet
  3. Bringing Back a Useful Browser Feature With a Bookmarklet

In the good old days, webmasters used to indicate that their website had a feed using a <meta> element. Then, Web browsers would show these feeds to their users, usually with a way to send the feed's URL to a feed reader of their choice. If you're willing to venture out into the single-process abyss, Pale Moon and SeaMonkey both still have this feature.

If you use a Duopoly browser, both of which have removed this feature (presumably to make room for more spyware), you aren't completely out of luck. There are many browser extensions that re-implement this feature for you. However, that sure is a lot of code running just to find an HTML element and display the contents. How could we do this in a simpler way? With bookmarklets, of course!

Here are the major advantages to my bookmarklet over a typical browser extension.

Unfortunately, doing this with a bookmarklet doesn't come without caveats. Namely, it doesn't work on websites with strict Content Security Policies. However, I've been using this bookmarklet for months and I can tell you it works on 95% of websites.

Here's the un-minified source code for your viewing pleasure. To install the bookmarklet, drag the following link to your bookmarks bar: Feed List

Alternatively, you can import the Netscape bookmark file that includes a nice favicon. The process for that is described in the previous post in the series: Defining a Favicon for a Bookmarklet.

To use the bookmarklet, just click it on any Web page. It will tell you if it didn't find any feeds, or you'll see a box pop up that lists the available feeds. From there, just copy the link and paste it into your preferred feed reader. Go ahead and try it out on this page. :)

I'm sorry I disappeared for so long. My goal is to average one post per month by the end of the year. I was doing well until last month, hopefully we can get our average back soon. See you next time.