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.
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.
I saw your blog while searching on http://inodes.org/2008/07/06/disabling-subscribe-to-feed-in-firefox/.
Do you have any techniques on the way to get registered in http:
//inodes.org/2008/07/06/disabling-subscribe-to-feed-in-firefox/?
I’ve been focusing on it recently but they still won’t take me.
Appreciate it