Friday, April 23, 2010

Lifehacker and truncated RSS feeds in Google Reader

If you use Google Reader extensively, you've probably noticed a feed or two that won't display the full contents of the articles.  Instead, some sites give you just enough of the text of an article to try to hook you and lure you to their site.  Presumably for the purpose of driving up the hit count and generating ad revenue.  Not necessarily a bad cause - sites you frequent deserve your support.  But it is really disruptive to the Google Reader experience to hop out to other sites in the middle of reading your feeds.  It's awkward and inefficient, and frankly I think it generates some ill will towards those feeds.

Interestingly, LifeHacker.com is one of those sites that has that problem, but in an interesting twist, today a post from LifeHacker shows some ways to fix it.  I picked the "Google Reader Full Feed Changer" option, which involved the following steps:
  1. Install the Grease Monkey Firefox plug-in
  2. Install the Grease Monkey script for the Reader hack
  3. Click "Manage User Scripts..." in Grease Monkey and edit the .JS script
  4. This step is different depending on which sites you're going to fix.  You need to know XPath and how to 'view source' on the desired sites, but it's not too tough.  I fixed LifeHacker.com and ArsTechnica.com with the following edit to the script:
var SITE_INFO = [
  {
    url:    'http://arstechnica.com',
    xpath:  '//div[@class="body"]'
  },
  {
    url:    'http://lifehacker.com',
    xpath:  '//div[@id="wrapper"]'
  }
  // etc, etc...

Once you hop back into Google Reader, the whole article will appear.  Very handy.

Thanks to Grease Monkey, the orange button can be replaced with the full article itself...