Disabling “Subscribe to feed” in firefox

At Vquence we do a lot of crawling of various video hosting sites and where possible we like to use APIs or RSS feeds instead of page scraping. A semi-recent features of firefox is that when you click on an RSS link you get a “Subscribe to this feed in your favourite reader” header and then the formatted contents of the feed.

This is really annoying if what you really want to see is the raw XML. Sure I could hit CTRL-U to see the source but thats an extra step and a whole other window I now have open. I couldn’t find any way to disable this functionality so I ended up writing a greasemonkey script called disable_subscribe_feed.js.

The meat of the script looks like

// Pick three element ids that appear in the "Subscribe to page" and probably 
var tag1 = document.getElementById('feedHeaderContainer');
var tag2 = document.getElementById('feedSubscriptionInfo2');
var tag3 = document.getElementById('feedSubscribeLine');

// Show the source
if (tag1 && tag2 && tag3) {
    location.href = 'view-source:' + document.location.href;
}

Basically it tries to detect the “subscribe to feed” page based on a couple of tag ids that exist on it and then performs a redirect to view-source: for that page. Which gives us nicely formatted XML.

2 thoughts on “Disabling “Subscribe to feed” in firefox

  1. Just a quick comment, I found out an easy way to disable the “Subscribe to feed” feature in firefox. For me it was coming up automatically, with no option to see the feed xml. Found here: http://www.jackpotbingouk.com/viewtopic.php?id=158

    FTA… Go to: Tools > Options > Applications – in ‘Applications’ there are 2 lists; “content type” and “action” scroll down the the list under “content type” and look for ‘Web Feed’.
    On the opposite column under “actions” you will see ‘add live bookmarks in firefox’ click and select “preview in firefox” – Thats it click OK to close ‘options’.

    In my case, running linux, I hit Edit > Preferences > Applications, then searched for “feed”, and changed the option for Web Feeds to Preview in Firefox.

Leave a Reply

Your email address will not be published. Required fields are marked *