I have been a Shrook user for over two years now (back when it wasn't free). I liked its three pane display and it has support for per feed preferences such as show the page itself instead of the contents of the feed. For feeds that only have excerpts and/or summaries, that makes the browsing experience so much nicer. Plus, it had feed synchronization to a central server, which was great for me at the time because I had two Macs. Unfortunately, it's a bit of a pig. It takes a long time to start up and even longer to exit.

When I saw that NetNewsWire was now free, I thought I should give it a try. Holy Smokes! It's soooo much faster. The three pane display is nice enough; I think Shrook's is slightly nicer. But it doesn't have a per feed preference for fetching the page instead of the feed content.

I couldn't believe that, so I did some googling. Fortunately for me, I tried NNW at just the right time because just days before I started using NNW, Oliver Boermans contributed a style that uses javascript to show the current page. Unfortunately, it does it for all feeds.

I was reading the comments and I found someone had the brilliant idea of making it conditional depending on which page is being loaded. The commenter did it from the title of the page, which seemed less than ideal to me. They also iterated through an array of sites instead of using javascript's native ability to have strings as array subscripts.

So here's my version that extracts the hostname from the URL and displays the page if that host is one of the hardcoded ones. I'm not javascript expert, but I was surprised that I couldn't find a built in function that parses URLs; maybe my google-fu is weak. I had to use a regexp.

This is not nearly as nice as Shrook's per feed preferences, but with this hack, I'm afraid I don't miss Shrook any more. The performance difference is just too good to give up. I modified the Default 3.1 style to include the javascript hack; if you prefer a different style, just add similar javascript to your preferred style.

<div id="_pageContainer">
<div id="_newsItemTitle">[[newsitem_title]]</div>
<script type="text/javascript">
  var previewArray = new Array();
  previewArray["reddit.com"] = true;
  previewArray["permalink.gmane.org"] = true;
  previewArray["atlanta.craigslist.org"] = true;
  previewArray["isc.sans.org"] = true;
  previewArray["krugman.blogs.nytimes.com"] = true;
  previewArray["freakonomics.blogs.nytimes.com"] = true;

  href = document.getElementById('_newsItemTitle').firstChild.getAttribute('href');
  var e=/http:\/\/([^:\/\s]+)([^?\s]+)/;
  if (href.match(e)) {
    host = RegExp.$1;
    if (previewArray[host]) {
      location.replace(href);
    }
  }
</script>
<div id="_newsItemContent">
<div id="_newsItemDateline">[[newsitem_dateline]]</div>
<div id="_newsItemDescription">
    [[newsitem_description]]
</div>
<div id="_newsItemExtraLinks">[[newsitem_extralinks]]</div>
</div>
</div>