Disabling Feed Previews in Firefox 2
One of the new features in Firefox 2 that really annoyed me was the new feed previewing option. Well, not really an option, but more of a forced option since there’s no easy built-in way to turn it off.
In Firefox 1.5, web feeds looked like this:
This tree view (with expandable/collapsible nodes) made it really convenient for viewing XML files (and RSS feeds). Fortunately, there is a way to re-enable this option in Firefox 2.
To achieve this, we’re gonna need to edit the FeedConverter.js file inside Firefox’s components folder. On Windows this should be located at C:\Program Files\Mozilla Firefox\components\FeedConverter.js. On a Mac (OS X) this should be located at /Applications/Firefox.app/Contents/MacOS/components/FeedConverter.js. Finally, on Linux, this might be located at /usr/lib/firefox-2.0.0.4/components/FeedConverter.js. (Note: this specific example is for PCLinuxOS 2007, and may vary slightly from distro to distro).
In the most recent version of Firefox, version 2.0.0.4, you’ll want to scroll down to about line 194 & find the following:
// show the feed page if it wasn't sniffed and we have a document,
// or we have a document, title, and link or id
if (result.doc && (!this._sniffed ||
(result.doc.title && (result.doc.link || result.doc.id)))) {
// If there was no automatic handler, or this was a podcast,
// photostream or some other kind of application, we must always
// show the preview page...
// Store the result in the result service so that the display page can
// access it.
feedService.addFeedResult(result);
// Now load the actual XUL document.
var chromeURI = ios.newURI(FEEDHANDLER_URI, null, null);
chromeChannel = ios.newChannelFromURI(chromeURI, null);
chromeChannel.originalURI = result.uri;
}
else
chromeChannel = ios.newChannelFromURI(result.uri, null);
chromeChannel.loadGroup = this._request.loadGroup;
chromeChannel.asyncOpen(this._listener, null);
}
finally {
this._releaseHandles();
}
},
Just change the “if” line (here it’s actually on 2 lines) to read:
if (0) {
This code was originally found here, and updated slightly to reflect the updates seen in the 2.0.0.4 FeedConverter.js file.

TonNet (Jul 12, 2007)
Nice to see you around again. Nice design you’ve picked. I will be back to check what news you have. Keep it up!
_ck_ (Mar 13, 2008)
This hack has mysteriously stopped working on the new 2.0.0.13 release candidate (though the file to edit is still there with sniffed and all)
Can anyone figure out what’s changed? I can’t :-(
moggy (Apr 07, 2008)
This hack still works for me in 2.0.0.13 final.
Pingback (Apr 18, 2008)
How To View RSS Feed In XML Format With Firefox - Walker News
Aaron Roberson (Mar 03, 2009)
Is there a way to put a conditional statement that would check for
a query string such as “view=feed” or “view=xml” so that we can
toggle between XML view and feed view? Something like: var qKeys =
{}; var re = /[?&]([^=]+)(?:=([^&]*))?/g; var matchInfo;
while(matchInfo = re.exec(location.search)){ qKeys[matchInfo[1]] =
matchInfo[2]; var qs = qKeys[matchInfo[1]]; } if(qs=’xml’){ Of
coarse that is checking the first variable of the query string only
(and it doesn’t work for some reason, probably misunderstanding the
rest of the code).