NetNewsWire style hack - Show web page instead of feed
- Posted
- 9:59 PM 7 February 2008
This stylesheet for NetNewsWire loads the linked web page instead of displaying the feed itself. It is a simple hack born from a question posed to the NetNewsWire email group yesterday. So Jan, here’s your answer:
Installation
Double-clicking the contained Ollicle Wittrodt.nnwstyle
package will prompt NetNewsWire to install the style in your Library.
Select Ollicle Wittrodt
from your styles menu to use it.
Note: If you haven’t already, you need to enable JavaScript for news items in NetNewsWire’s preferences for this style to do anything remotely special:
- NetNewsWire Preferences
- Browsing
- News Items
- Enable JavaScript
- News Items
- Browsing
How it works
One line of JavaScript! Despite calling it a stylesheet it does not include a single line of CSS, just a very trim template file:
<div id="newsItemTitle">[[newsitem_title]]</div>
<script type="text/javascript">
location.replace(document.getElementById('newsItemTitle').firstChild.getAttribute('href'));
</script>
Coming soon
For those of you who prefer their feed reading to be clean, consistent and snappy, I have been working on a slowly evolving and revamped version of Ollicle Reflex. It has some subtle niceties I am very much looking forward to sharing, so keep that browning ollicle.com feed in your list for a little longer yet.
Pretty nice. Now, the next step would be setting per-feed style preferences in NNW. This way, one could fix the feeds that only display the beginning of the article. Thanks Oliver!
You inspired me to finally get around to making a style with this functionality. I copied your method of replacing the location of the page (thanks!) and added the ability to do this per-feed…. it’s not that pretty but it works.
I have it so that the particular article loads (instead of the general feed webpage).
This code will work in Vienna but I imagine you can easily adapt it to NetNewswire:
I threw together a quick stylesheet that loads the link directly only for specified feeds (with the default style). You can download it here.
If you want to adapt this to your own themes, the template.html looks like this: