<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>ollicle.com</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/" />
    <link rel="self" type="application/atom+xml" href="http://www.ollicle.com/atom.xml" />
    <id>tag:www.ollicle.com,2010-03-28://1</id>
    <updated>2010-05-28T07:36:06Z</updated>
    <subtitle>Oliver Boermans is a design geek in Adelaide, South Australia: ollicle.com is a place for Ollie to rant, reflect and share.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 5.02</generator>

<entry>
    <title>Rebranding BP</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2010/may/28/rebranding_bp.html" />
    <id>tag:www.ollicle.com,2010://1.110</id>

    <published>2010-05-28T06:53:25Z</published>
    <updated>2010-05-28T07:36:06Z</updated>

    <summary>This logo is a simple visual representation of the new strengthened association between BP and what they mine. From now on, the BP flower will be seen as a weakly disguised &apos;O&apos; for &apos;OIL&apos;.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>Don&#8217;t you hate it when a client makes a mess of the perfectly good branding work.</p>

<p>Though both their action and inaction in the gulf, BP has changed what we see when we think of their brand. At the same time the accident has demonstrated how dirty this energy source can be. </p>

<p>This is the logo I submitted to Greenpeace UK for their call to <a href="http://www.greenpeace.org.uk/files/tarsands/logo-competition.html">redesign BP&#8217;s logo</a>.</p>

<p><img src="/2010/may/28/img/bp-oil.png" alt="BP oil" title="" /></p>
]]>
        

    </content>
</entry>

<entry>
    <title>The universal back button</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2010/may/24/universal_back_button.html" />
    <id>tag:www.ollicle.com,2010://1.109</id>

    <published>2010-05-24T06:00:26Z</published>
    <updated>2010-05-28T03:46:03Z</updated>

    <summary>Is it possible for the back button to escape the browser? I&apos;d like to see referrers do for my desktop what they do for the web. Here&apos;s to hoping.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>Brent proposed a <a href="http://inessential.com/2010/05/23/apps_that_work_together_on_ipad" title="Apps that work together - on iPad">very sensible idea</a> today on his blog which I would like to take a tangent from and run with.</p>

<p>I read a lot on the web and increasingly it&#8217;s becoming a social activity. Links come from all directions: Email, Twitter, RSS feeds, IM, Facebook and surprise surprise, other webpages. These links are the stuff of many of conversations we share, and a great thing about the web is the friction for the conversation to move across the various internet technologies is minimal. The URL breaks all the boundaries. In theory anyway. </p>

<p>On my Mac when I click a button to pass a link from one application to another, it&#8217;s up to me to remember where it came from, which conversation it was central to and who and where I should direct my response to regarding it. This mental load heavier on an iPad [or iPod Touch in my case] when you can&#8217;t leave the window of the first application visibly open as a reminder.</p>

<p>The popular response to this problem is to design the application around the conversation activity. Build the browser into the feed reader, integrate the twitter posting widget into the photo software, add the email app into the bookmarking do-dad. This approach will bring glee to those who it fits nicely, but tends to become <em>less</em> useful, or worse, heavy and bloated for those with slightly different needs.</p>

<p>The web has an answer to this I would love to see some analogy of on my Mac - the HTTP referrer. When you click a link on a web page, simplistically your browser will send a request for that page to the server hosting it; Along with that request, it carries a note of where the link came from. This information will appear in the visitor logs or Google Analytics reports for that site. It goes a long way to connect the participants of online conversations.</p>

<p>The closest thing to it in practice on my computer is the history in my browser that enables the back button to work. I am web developer so here is my question to those who know about this stuff: Is it possible for the back button escape the browser? </p>

<p>On a Mac maybe something like <a href="http://www.choosyosx.com/">Choosy</a> could form the basis for the background app that Brent speaks of?</p>

<p>Imagine clicking the normally greyed out back button and have your twitter application launch - displaying the tweet you clicked to load that page. That would fill this particular software user with glee, at least until I quickly forgot there was a time when I couldn&#8217;t do such a thing.</p>
]]>
        <![CDATA[<h3>25 May 2010</h3>

<p>In response to Brent&#8217;s post, Rainer Brockerhoff also writes he&#8217;s been thinking about a HTTP referrer like approach to this problem: <a href="http://brockerhoff.net/blog/2010/05/24/re-apps-that-work-together-—-on-ipad/">Re: Apps that work together — on iPad</a></p>

<p>Unlike me, Rainer knows a little about OSX development and goes on to explain how it might be possible, before concluding:</p>

<blockquote>
  <p>All this needs filing enhancement requests and Apple would have to do the required twiddling inside their code base - or rather, bases, as this would be useful to have both on the iPhone/iPad and the Mac side. It would take a long time, if it&#8217;s done at all.</p>
  
  <p>The alternative would be to developers to, informally, establish a convention for incorporating this into the URL itself. So we&#8217;d have something like:
  calledscheme:///the/url/parameters&amp;?REF=callingscheme://some/url/to/return</p>
  
  <p>Probably the second part would have to be suitable encoded/escaped, too. Maybe this would be a good topic for discussion at WWDC?</p>
</blockquote>

<p>I have faith that the Mac dev community can get together to make this work.</p>

<h3>27 May 2010</h3>

<p>Daniel Stødle has done some clever work. He has released a <a href="http://www.scsc.no/products/ubb/" title="Universal Back Button">working menu bar app</a> that infers the previous application from debugging information already available in Apple events.</p>

<p>Quoting Daniel&#8217;s blog post, <a href="http://www.scsc.no/blog/2010/05-26-universal-back-button-released-for-mac-os-x.html">Universal Back Button released for Mac OS X</a></p>

<blockquote>
  <p>By continuously analyzing the output from the console log, UBB can infer which app caused a different app to open a file or link, and thus create a &#8220;back relation&#8221; to the app.</p>
  
  <p>For instance, when I click a link in iChat, a &#8220;GURL&#8221; Apple Event is sent to my default web browser (Safari, FIrefox, etc.). UBB notices this, and when you click the universal back button in your menubar, UBB switches you right back to iChat.</p>
  
  <p>Of course, the mechanism has some drawbacks. For instance, there is no association between different windows - the association only exists between different apps. So if you have several windows open in iChat, the UBB won&#8217;t necessarily bring you back to the window that sent you to Safari in the first place. But, we have to start somewhere, and this is as good a starting point as any.</p>
</blockquote>

<p>This is a bigger step in than I could have imagined possible in such a small time. Daniel includes a link in this blog post to his source code for others to build upon. I&#8217;m looking forward to more looking back on my Mac!</p>

<h3>28 May 2010</h3>

<p>Billy Gray <a href="http://www.zetetic.net/blog/2010/05/27/re-apps-that-work-together-on-ipad">adds his support</a> for Brent&#8217;s suggestion and expands on the need for a service discovery mechanism.</p>

<p>Such functionality would be an incentive to uninstall apps from our devices to keep the list of apps jostling to accept that URL to a minimum. I have a lot of Twitter apps on my iPod! For example, the number of apps my Mac offers when I hover the &#8216;Open with&#8217; contextual menu item on a .html file is well out of control. An interesting problem.</p>
]]>
    </content>
</entry>

<entry>
    <title>Back from the dead</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2010/may/09/site-upgrade.html" />
    <id>tag:www.ollicle.com,2010://1.107</id>

    <published>2010-05-09T11:05:52Z</published>
    <updated>2010-05-09T11:08:41Z</updated>

    <summary>Today I took this site offline for a few hours while I moved aside the old bones to make room for a brand new skeleton. Naturally the skin and flesh still need some work.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>Today I took this site offline for a few hours while I moved aside the old bones to make room for a brand new skeleton. Naturally the skin and flesh still need some work.</p>

<p>The old ollicle.com was powered by an ancient version of Movable Type, held together with discontinued plug-ins and the kind of bits that most people use to hold their bread bags shut.</p>

<p>Upgrading became easier once I had made the tough decision to discard anything that wasn&#8217;t straight forward to transfer, or couldn’t wait until another day. I&#8217;ve scraped the templates back to the bone for a clean fresh start. The page and folder management offered by the current Movable Type system has proved useful to build some permanent homes for my <a href="/projects/">project pages</a>. </p>

<p>The main navigation is the one part on which I&#8217;ve spent some time messing with CSS and jQuery. Even that has a way to go to satisfy me that it’s right. With the big upgrade job out of the way there&#8217;s a myriad of design details waiting for attention. The content of this site though, is in greatest need for time investment. Going though the old entries to fix broken links and images made me all the more aware of the need to dust off my neglected projects.</p>

<p>Feels good to blog again.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Reduce attention in NetNewsWire with AppleScript</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2009/nov/14/netnewswire_applescript_attention.html" />
    <id>tag:www.ollicle.com,2009://1.91</id>

    <published>2009-11-14T11:20:45Z</published>
    <updated>2010-04-25T03:45:52Z</updated>

    <summary><![CDATA[There&rsquo;s too much junk in my NetNewsWire so I&rsquo;ve written an AppleScript to penalise time wasting feeds.]]></summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>There&rsquo;s too much junk in my NetNewsWire so I&rsquo;ve written an AppleScript to penalise time wasting feeds.</p>

<p>Many things interest me. As a result, over the last number of years, I have subscribed to feeds from way too many sources. Currently in NetNewsWire I have over two and a half thousand unread items. The only problem with this is the number of highly interesting items that I imagine I miss. They are lost in the crowd of items that are only mildly fascinating.</p>

<p>NetNewsWire provides a tool to help deal with this scenario. By choosing to <a href="http://inessential.com/2006/03/17/netnewswire_2_1_sorting_by_attention" title="inessential.com">sort by attention</a> feeds I am more likely to value float to the top. </p>

<p>From the <a href="http://ranchero.com/netnewswire/help/3.2/en/attentionsorting.html">NetNewsWire manual</a>:</p>

<blockquote>
  <p>How does NetNewsWire figure out attention?</p>
  
  <p>It watches what you do with the items in each feed. If you flag items in a feed, send items via email, post to Delicious, or post to your weblog, it figures this feed is pretty important to you. The more you do those things, the more important is the feed.</p>
</blockquote>

<p>After using this feature for some time, the feeds I interact with most frequently have made their way to the top of my subscription list. Trouble is, this system has significant bias towards feeds which carry the highest posting frequency. Although I may only be interested in a small percentage of the items in a particular rapid fire feed, it will likely rate higher than another feed with only sporadic updates; Even if I find most of them invaluable.</p>

<p>Unsubscribing from feeds is a solution, and I have been, but I&rsquo;d rather do it based on evidence and so far attention score is the best measure I&rsquo;ve got. For the attention score in NetNewsWire to better represent a feed&rsquo;s relative value it needs some help from me. I need to penalise the time wasters. </p>

<p>Fortunately NetNewsWire provides a method to influence the attention score of a feed item as described in the <a href="http://newsgator.mykbpro.com/Article_9A3EC.aspx">Newsgator knowledge base</a>:</p>

<blockquote>
  <p>How can I change the Attention Score of a feed?</p>
  
  <p>You can adjust the score for a feed using an AppleScript script. Here are the details from the AppleScript dictionary for NetNewsWire:</p>
  
  <p>&#8220;scripted attention score (integer) : To affect the calculated attention score, you can change the scripted attention score. The scripted attention score is a component of the calculated attention score (it&#8217;s added).&#8221;</p>
  
  <p>The scripted attention score is a property of a subscription object. (Tip: to lower a score, make it a negative number.)</p>
</blockquote>

<p>So I put together an AppleScript to <strong>Reduce Attention Score of the feed</strong> of the selected post:</p>

<pre><code>tell application "NetNewsWire"
    if exists selectedHeadline then
        set thisSubscription to subscription of selectedHeadline
        set currentScore to scripted attention score of thisSubscription
        set scripted attention score of thisSubscription to currentScore - 1

        set growlDescription to "Score reduced to " &amp; calculated attention score of thisSubscription

        tell application "GrowlHelperApp"
            register as application "NetNewsWireScore" all notifications {"Attention"} default notifications {"Attention"} icon of application "NetNewsWire"
            notify with name "Attention" title "Attention" application name "NetNewsWire" description growlDescription icon of application "NetNewsWire"
        end tell

        tell application "System Events" to keystroke "+"

    else if exists selectedSubscription then
        tell application "System Events" to keystroke "+"
    end if
end tell
</code></pre>

<p>Incorportating NetNewsWire&rsquo;s shortcut (to jump to the next unread item) for efficiency.</p>

<p>To install this script I suggest you copy-paste it into a new script file in <a href="http://www.apple.com/macosx/what-is-macosx/apps-and-utilities.html#scripteditor" title="Apple site">Script Editor</a> and save it with a meaningful title into <code>~/Library/Scripts/Applications/NetNewsWire/</code>.</p>

<p><a href="http://www.red-sweater.com/fastscripts/">FastScripts</a> made it easy to a assign a keyboard short-cut to launch the script. I assigned Option-Space, mostly for it&rsquo;s memorable similarity to hitting the space-bar. </p>

<p>Including a Growl notification reassures me something actually happened when it runs.</p>

<p>While I was at it, I made another to <strong>Increase Attention score</strong> of the selcted post:</p>

<pre><code>tell application "NetNewsWire"
    if exists selectedHeadline then
        set thisSubscription to subscription of selectedHeadline
        set currentScore to scripted attention score of thisSubscription
        set scripted attention score of thisSubscription to currentScore + 1

        set growlDescription to "Score increased to " &amp; calculated attention score of thisSubscription

        tell application "GrowlHelperApp"
            register as application "NetNewsWireScore" all notifications {"Attention"} default notifications {"Attention"} icon of application "NetNewsWire"
            notify with name "Attention" title "Attention" application name "NetNewsWire" description growlDescription icon of application "NetNewsWire"
        end tell

        tell application "System Events" to keystroke "+"

    else if exists selectedSubscription then
        tell application "System Events" to keystroke "+"
    end if
end tell
</code></pre>

<p>To trigger this script I chose Command-space. So now when I have finished looking at a post in NetNewsWire I have three choices:</p>

<ul>
<li>Hitting Space (or +) takes me to the next unread item as normal.</li>
<li>Uninteresting or redundant: Option-Space to mark it as a time waster before moving on.</li>
<li>Of value but doesn&rsquo;t inspire a measurable action: Command-Space to reward the feed anyway.</li>
</ul>

<p>It will be very interesting to see what impact using this technique will make on my subsciption list.</p>
]]>
        <![CDATA[<h3>28 November 2009</h3>

<p>After noticing an issue with these scripts where it was being triggered multiple times I&#8217;ve had a closer look and made some changes to them. </p>

<p>The + key is the proper &#8220;Next unread&#8221; shortcut to jump to the next unread item in NetNewsWire. Space-bar only does this if there is no more page scroll.</p>

<p>This change also stopped the unwanted looping. Generally I still had the Option key depressed when the space-bar key was evoked by the first version of the script, this re-triggered the script a number of times.</p>

<p>Also some a curiosity satisfying feedback to the Growl notification; The current calculated score of the modified feed.</p>
]]>
    </content>
</entry>

<entry>
    <title>Ollice Reflex 9 - it&#8217;s about time</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2009/nov/07/ollicle_reflex_9_update.html" />
    <id>tag:www.ollicle.com,2009://1.90</id>

    <published>2009-11-07T09:27:52Z</published>
    <updated>2010-04-06T12:25:06Z</updated>

    <summary>A stylesheet for NetNewsWire that uses clean typography, clever CSS and crafty JavaScript to smooth out the rough edges of feed reading. Now updated to version 9 with some timely new features.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>A stylesheet for NetNewsWire that uses clean typography, clever CSS and crafty JavaScript to smooth out the rough edges of feed reading. Now updated to version 9 with some timely new features. Keep reading for a summary of what&rsquo;s new.</p>

<h2>Download and install</h2>

<p>Download latest version: <a href="/projects/netnewswire/reflex/">Ollicle Reflex</a></p>

<p>Double-click the unzipped .nnwstyle file - NetNewsWire will copy it to where it needs to be:</p>

<pre><code>~/Library/Application Support/NetNewsWire/StyleSheets/
</code></pre>

<p>If you are using an old version of Ollicle Reflex already installed you will need to restart NetNewsWire for the new one to load.</p>

<p>This style uses JavaScript to do some things CSS alone cannot. Make sure you enable it:</p>

<ul>
<li><p>NetNewsWire Preferences</p>

<ul>
<li><p>Browsing</p>

<ul>
<li><p>News Items</p>

<ul>
<li>Enable JavaScript</li>
</ul></li>
</ul></li>
</ul></li>
</ul>

<p>If you haven&#8217;t already you can also select Ollicle Reflex from the Style Sheet menu in the same place or in the right hand end of NetNewsWire&rsquo;s status bar.</p>

<h3>Requirements</h3>

<p>This style has been developed and tested on a PowerPC Mac running <a href="http://www.newsgator.com/Individuals/NetNewsWire/">NetNewsWire</a> 3.2.3 on Mac OS X 10.5.8 (Leopard for the cat fanciers) with Safari 4 (which determines the version of WebKit NetNewsWire is sporting). <em>I&rsquo;m interested to know how it works for you.</em></p>

<p>Note: <a href="http://ranchero.com/category/netnewswire-styles/">styles for NetNewsWire</a> do not affect the Combined view &ndash; only the Traditional and Widescreen views.</p>

<h2>About a year ago</h2>

<p>I <a href="/2008/mar/08/ollicle_reflex_netnewswire_style.html">posted</a> an update of Ollicle Reflex. More recently, a tiny new feature in NetNewsWire 3.2 has got me fired up to make a fresh version.</p>

<p>From <a href="http://en.wikipedia.org/wiki/ISO_8601">Wikipedia</a>:</p>

<blockquote>
  <p>ISO 8601 is an international standard covering the exchange of date and time-related data.</p>
</blockquote>

<p>NetNewsWire now includes the ISO formatted date in UTC as a title attribute on the date (in the meta information of each feed visible in the description pane). Hover over the date there and you&#8217;ll see the title appear in a little yellow rectangle. It will read something like this: <code>2009-09-27T14:37:53Z</code>.</p>

<p>Ugly isn&#8217;t it! Dates formatted in this way are not intended for the eyes of humans. So why bother? When the date is formatted in a predicatable manner such as this, it&#8217;s <del>much easier</del> possible to write software to make sense of it. Or in this case, use JavaScript in a NetNewsWire style to make the date useful.</p>

<h2>Fuzzy dates</h2>

<p>Generally when I look at a date of a feed in my feed reader I want to know how long ago it was posted. Not exactly, just a rough idea. To reduce the mental mathematics needed to determine this I&#8217;ve made use of <a href="http://timeago.yarp.com/" title="Thanks Ryan!">timeago</a> a jQuery plugin written specifically for this purpose. Out of the box NetNewsWire shows me the date and time like this &#8220;30/10/09 10:47 PM&#8221;. With the timeago plugin integrated, Ollicle Reflex uses the new ISO date to dynamically replace this with something friendlier like &#8220;about 18 hours ago&#8221;.</p>

<p>Clicking the fuzzy date will toggle between it and the orginal.</p>

<h2>Aging posts</h2>

<p><a href="http://twitter.com/ollicle" title="@ollicle">Twitter</a> has taken a large bite out of the time I spend in my feedreader looking for new and interesting stuff on the web. As a result it&rsquo;s not unusual for me to have too many old posts from blogs I haven&#8217;t clicked on for a while. To reflect the fading relevance of these old posts, Ollicle Reflex will subtely and incrementally alter the background and text colours in a way reminicent of the pages of an old book.</p>

<p>This effect is only visible in the white style and only really begins to be evident once a post is about a month old. The colour continues to brown for a year at which point everything on the web is ancient history.</p>

<h2>Refinements</h2>

<p>The remaining improvements are refinements to <a href="/projects/netnewswire/reflex/">existing features</a>. These features are designed to go unnoticed which is ultimately the idea of this style.</p>

<h3>Image layout much improved</h3>

<p>A few small changes, decisions and bug fixes have made a huge difference to how Ollicle Reflex flows text around floated images. For my use, this is the most significant improvement in this version.</p>

<h3>Design tweaks</h3>

<ul>
<li><p>Blockquotes now look more like quotes with the addition of Big Quote Marks&trade;</p></li>
<li><p>CSS transistions have made interface animations smoother and more reliable.</p></li>
<li><p>The feed preference button now looks more like what it does.</p></li>
<li><p>Refined the design of the diff indicators of highlighted feed changes. Whitespace only changes are now ignored.</p></li>
<li><p>A bunch of tiny changes only a mother would notice.</p></li>
</ul>

<h3>Under the hood</h3>

<ul>
<li><p>Updated to use jQuery 1.3.2</p>

<p>Might be faster - I can&#8217;t tell, maybe you can.</p></li>
<li><p>Transparent rgba colours were handy for keeping the aging effect simple.</p></li>
</ul>

<h2>What next</h2>

<p>Let me know how it works for you! Although I have added more things to the todo list than were removed making this version. That doesn&#8217;t mean I&#8217;m not interested in feedback and ideas for what might make version 10 that much better.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Ollicle Reflex refined for smarter feed reading</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2008/mar/08/ollicle_reflex_netnewswire_style.html" />
    <id>tag:www.ollicle.com,2008://1.89</id>

    <published>2008-03-08T03:52:01Z</published>
    <updated>2010-05-09T13:56:29Z</updated>

    <summary>The sixth iteration of my NetNewsWire style, Ollicle Reflex, is smarter than your average blog style. CSS and JavaScript work as a team to keep your feeds sharp.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>It&#8217;s been a long time cooking, but I am finally taking version 6 of Ollicle Reflex out of the oven.</p>

<h2>Download and install</h2>

<p class="ollicle">Download latest version: <a href="/projects/netnewswire/reflex/">Ollicle Reflex</a></p>

<p>Double-click the unzipped .nnwstyle file and NetNewsWire will copy it to where it needs to be.</p>

<pre><code>~/Library/Application Support/NetNewsWire/StyleSheets/
</code></pre>

<p>This style uses JavaScript to do some things CSS alone cannot. Make sure you enable it</p>

<ul>
<li>NetNewsWire Preferences
<ul>
<li>Browsing
<ul>
<li>News Items
<ul>
<li>Enable JavaScript</li>
</ul></li>
</ul></li>
</ul></li>
</ul>

<h3>Requirements</h3>

<p>I have not tested this style extensively with anything other than the current version of <a href="http://www.newsgator.com/Individuals/NetNewsWire/">NetNewsWire (3.1.3)</a> and <a href="http://www.apple.com/safari/">Safari 3</a> (which determines the version of WebKit NetNewsWire is sporting).</p>

<p><strong>Note</strong>: styles for NetNewsWire 3 do not affect the Combined view - only the Traditional and Widescreen views.</p>

<h2>Key features</h2>

<ul>
<li><h3>Simple clean style</h3>

<p>Doesn&#8217;t get in the way of your choice of feed reading font and size. <strong>New for Version 6</strong>: added some simple styling to make data tables easier to read.</p></li>
<li><h3>Clever image handling</h3>

<p>Large images are scaled to fit available space. <strong>New for Version 6</strong>: automatic alignment of smaller images, avoiding awkwardly squashed text.</p></li>
<li><h3>Automatic line height</h3>

<p>Optimises line spacing of the feed text to suit your window and font size. More about this: <a href="/2005/oct/12/javascript_flex_css.html">Flex CSS with JavaScript for better reading</a></p></li>
<li><h3>Del.icio.us Tagometer</h3>

<p>The number of del.icio.us bookmarks for the linked webpage is displayed along with the most popular tags they assigned to it. <strong>New for Version 6</strong>: a little hackery to see through feedburner urls and a more compact and  stylish look.</p></li>
<li><h3>Tidy diff display for recent feed changes</h3>

<p>With Highlight Differences checked in NetNewsWires general preferences you can toggle between the current and previous version of a changed feed. <strong>New for Version 6</strong>: feed changes are highlighted in a vertical bar in the left hand column. Hovering the bar with your cursor highlights additions inline, clicking it hides additions and reveals the deleted content.</p></li>
<li><h3>A choice of layouts</h3>

<p>Two layouts to choose from: One column (default for NetNewsWires Widescreen layout) with the feed info in the footer, or two column (default for the Traditional layout) with the feed info persistent in the right hand margin. <strong>New for Version 6</strong>: now possible to set a default irrespective of your choice of NNW layout (see below).</p></li>
<li><h3>Dark or light theme</h3>

<p>Choose between the default white background or the image enhancing black background. <strong>New for Version 6</strong>: changed method for setting black as the default (see below).</p></li>
<li><h3>Per feed layout and theme prefs</h3>

<p>Clicking the little button in the top right hand corner of the feed pane toggles the preference pop-up for your currently viewed feed. Cookies NetNewsWire shares with Safari are used to store your selection of layout or theme for any post from that feed. <strong>New for Version 6</strong>: the preference pop-up now scales nicely when you make the feed text bigger and smaller with Command +/-.</p></li>
<li><h3>Customisable defaults</h3>

<p><strong>New for Version 6</strong>: If you don&#8217;t like my selection of defaults in Ollicle Reflex I have made a few of the prefences more easily configurable. I have removed the unintuitive hack for changing the default theme (adding &#8220;Black&#8221; to the filename of the the nnwstyle package). Now you will need to roll up your sleeves and launch your text editor. </p>

<p>Locate the Ollicle Reflex style package <code>~/Library/Application Support/NetNewsWire/StyleSheets/Ollicle Reflex.nnwstyle</code> reveal it&#8217;s contents by right (or control) clicking it and selecting &#8220;Show Package Contents&#8221;.</p>

<p>At the top of the contained &#8220;javascript.js&#8221; you will find values set within the curly brackets of <code>var userPref = {};</code>. To set a default layout you need to first uncomment the line by removing the <code>//</code> from the start of the line. Otherwise make sure you only edit what falls between the colon and the comma, and ensure you leave the quotes around the layout and skin names. Note the last item shouldn&#8217;t have a trailing comma. </p>

<p>To see your changes take effect it is necessary to relaunch NetNewsWire so it can update it&#8217;s cache of the style. </p>

<p>Maybe someday I&#8217;ll try my hand at making a small AppleScript app to edit these options in a more friendly manner. If in the meanwhile you manage to break it (the JavaScript elements of the style will stop working), you can always come back here and download the style again. </p></li>
</ul>

<h2>Screenshots</h2>

<p>I&#8217;d love to have a screencast to give you a better preview of the style. For now here&#8217;s a few screenshots that illustrate the font size and layout flexibility. Although, rather than waste time looking at them, I recommend scrolling back up the top of this page and downloading it.</p>

<h3>Widescreen NetNewsWire layout</h3>

<h4>One column layout by default</h4>

<p><a href="/2008/mar/08/img/one-column-wide-default.png"><img src="/2008/mar/08/img/one-column-wide-default-sml.png" alt="Widescreen one column layout" title="View full size screenshot" /></a></p>

<h4>Larger font size</h4>

<p><a href="/2008/mar/08/img/one-column-wide-big.png"><img src="/2008/mar/08/img/one-column-wide-big-sml.png" alt="Widescreen one column layout with large text" title="View full size screenshot" /></a></p>

<h4>Two column&#8212;smaller font size</h4>

<p><a href="/2008/mar/08/img/two-column-wide-small.png"><img src="/2008/mar/08/img/two-column-wide-small-sml.png" alt="Widescreen two column layout with small text" title="View full size screenshot" /></a></p>

<h3>Traditional NetNewsWire layout</h3>

<h4>Two column layout by default</h4>

<p><a href="/2008/mar/08/img/two-column-default.png"><img src="/2008/mar/08/img/two-column-default-sml.png" alt="Traditional two column layout" title="View full size screenshot" /></a></p>

<h4>Larger font size</h4>

<p><a href="/2008/mar/08/img/two-column-big.png"><img src="/2008/mar/08/img/two-column-big-sml.png" alt="Traditional two column layout with large text" title="View full size screenshot" /></a></p>

<h4>One column&#8212;arger font size</h4>

<p><a href="/2008/mar/08/img/one-column-big.png"><img src="/2008/mar/08/img/one-column-big-sml.png" alt="Traditional one column layout with large text" title="View full size screenshot" /></a></p>

<h3>Black background</h3>

<p><a href="/2008/mar/08/img/two-column-black.png"><img src="/2008/mar/08/img/two-column-black-sml.png" alt="Traditional two column layout with black background" title="View full size screenshot" /></a></p>

<h2>Scripting image layout is tricky</h2>

<p>The logic executed to determine if an image should be scaled, aligned or left inline is much simpler than my initial somewhat ambitious scheme. I was driven crazy trying to get my head around the increasingly complex possibilities that cascaded from attempting to consider how to handle clusters of images such as those often found in the FlickrBlog.</p>

<p>After sufficient frustration I decided to focus on the more common occurrence of individual images of unpredictable dimensions alongside or within a portion of text. In a nutshell, the trade-off is that images that ought to sit nicely alongside each other in the one row are now forced under one another vertically. Very occasionally this looks broken.</p>

<p>Many bloggers continue to use double line breaks instead of regular paragraphs. I&#8217;ll give them the benefit of doubt by pointing my accusatory finger at their blogging tools rather than their shoddy HTML. Regardless, this made the task of ensuring associated text and images remained close in the layout particularly challenging. I delayed the release of this style until I came up with a means to get the better of this puzzle.</p>

<h2>Why spend some much time on a simple looking style?</h2>

<p>The consistency and convenience of feed reading comes with a price. In the thoughtfully constructed HTML content of a RSS feed I get the author&#8217;s words and images. I also get the emphasis and structure of their sentences and also links to their references. I get their meaning. I don&#8217;t get their CSS. </p>

<p>Many readers, who consider themselves visually or design literate, appreciate the aesthetic of the original artifact of the authors website. Many web authors are dismayed to see the effort they put into the presentation of their posts wasted to feed readers who never see the intended context of the site itself. These people don&#8217;t need help finding each other. For everyone else, there is work that can be done. The decisions that go into CSS in a modern website address more than just aesthetic vision of the author. </p>

<p>CSS is the primary tool for removng the obstacles to easy reading. A website built within a given layout and structure provides enough restrictions to widths and heights that effort put into molding the text to best fit it&#8217;s space is worthwhile. Outside of the cushy environment of the homepage, in the diverse wilderness of RSS and Atom consumption, these constraints lose relevance. Therefore, outside of the author&#8217;s site, so does the author&#8217;s CSS.</p>

<p>A feed reader style like Ollicle Reflex, if it is to to fulfil the needs of a discerning reader, needs to be much smarter than a style for an average blog. Not only is the content presented by a feedreader more varied (and often broken) than any given site, the user of a good feed reader has a great deal more control over how how these feeds are viewed.</p>

<p>These diverse demands, and my curiosity, have driven me to turn to JavaScript in Ollicle Reflex. CSS alone struggles to keep the content looking consistently considered.</p>

<h3>Scratching my own back</h3>

<p>Like NetNewsWire, Ollicle Reflex is free. I build it chiefly to scratch my own itches. That said, I love to know others are using it so bring on the feedback! </p>

<p>To all of you who have been suffienctly tempted by my words above to click out of your feedreader to load ollicle.com to best appreciate it&#8217;s full artistic intent&#8230; Lets say I have put a little more effort into Ollicle Reflex than my site in recent years :/ Might have to get back onto that.</p>
]]>
        <![CDATA[<h3>14 March 2008</h3>

<p>Updated the download link above to version seven:</p>

<ul>
<li><p>User preference for line-height now works (Thanks Matt).</p></li>
<li><p>Added user preference (in javascript.js) to hide/show the del.icio.us tagometer (Good suggestion Jonathon).</p></li>
</ul>
]]>
    </content>
</entry>

<entry>
    <title>NetNewsWire style hack - Show web page instead of feed</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2008/feb/07/netnewswire_style_hack.html" />
    <id>tag:www.ollicle.com,2008://1.87</id>

    <published>2008-02-07T12:29:09Z</published>
    <updated>2010-05-09T13:35:20Z</updated>

    <summary>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.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>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&#8217;s your answer:</p>

<p class="download"><a href="/projects/netnewswire/wittrodt/ollicle-wittrodt1.zip">ollicle-wittrodt1.zip</a></p>

<p><img src="/2008/feb/07/img/wittrodt-screenshot.jpg" alt="Linked web page displayed in NetNewsWire HTML pane" title="" /></p>

<h2>Installation</h2>

<p>Double-clicking the contained <code>Ollicle Wittrodt.nnwstyle</code> package will prompt NetNewsWire to install the style in your Library.</p>

<p>Select <code>Ollicle Wittrodt</code> from your styles menu to use it.</p>

<p><strong>Note</strong>: If you haven&#8217;t already, you need to enable JavaScript for news items in NetNewsWire&#8217;s preferences for this style to do anything remotely special:</p>

<ul>
<li>NetNewsWire Preferences
<ul>
<li>Browsing
<ul>
<li>News Items
<ul>
<li>Enable JavaScript</li>
</ul></li>
</ul></li>
</ul></li>
</ul>

<h2>How it works</h2>

<p>One line of JavaScript! Despite calling it a stylesheet it does not include a single line of CSS, just a very trim template file:</p>

<pre><code>&lt;div id="newsItemTitle"&gt;[[newsitem_title]]&lt;/div&gt;
&lt;script type="text/javascript"&gt;
    location.replace(document.getElementById('newsItemTitle').firstChild.getAttribute('href'));
&lt;/script&gt;
</code></pre>

<h2>Coming soon</h2>

<p>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 <a href="/2007/apr/25/delicious_netnewswire_style.html">Ollicle Reflex</a>. 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. </p>
]]>
        

    </content>
</entry>

<entry>
    <title>Bigger link: easier clicking with jQuery</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2007/oct/23/jquery_link_plugin.html" />
    <id>tag:www.ollicle.com,2007://1.86</id>

    <published>2007-10-23T12:18:51Z</published>
    <updated>2010-05-09T14:12:21Z</updated>

    <summary>Bigger links are easier to click for everyone. I have written a jQuery plugin which makes implementing easier to click links easier. </summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>Bigger links are easier to click for everyone. I have written a jQuery plugin which makes implementing easier to click links easier. </p>

<p>For details you can jump straight to the <a href="/projects/jquery/biggerlink/">documentation/demo</a>. The following ramble is a little about why I think the plugin is useful.</p>

<h3>Big A</h3>

<p>There are a variety of strategies I have used at work to enlarge the &#8216;hot&#8217; or &#8216;clickable&#8217; area of a links to something more substantial than the regular familiar text link.</p>

<ul>
<li>Resize the <code>&lt;a&gt;</code> with CSS</li>
<li>Wrap it around an image</li>
<li>Link more text</li>
<li>Duplicate the link on multiple elements</li>
</ul>

<p>With HTML alone there is a significant limitation common to the above. While producing valid code, only inline elements may be included inside the <code>&lt;a&gt;</code> element. As an inline element an <code>&lt;a&gt;</code> can never contain a <code>&lt;p&gt;</code>, <code>&lt;h3&gt;</code>, <code>&lt;li&gt;</code> or any other block element.</p>

<p>Using your ninja-like CSS knowledge you can trick a <code>&lt;span&gt;</code>, <code>&lt;em&gt;</code> or <code>&lt;strong&gt;</code> into looking just like their more important blocky friends and wrap this markup in one big link to make it all clickable. Although the result will be valid code the browser bugs you will uncover can be tricky. Long passages of text in links is an accessibility no-no and can look damn nasty without the supporting CSS.</p>

<h3>Time to turn to JavaScript for help.</h3>

<p>In the bad old DHTML days you may have seen something like:</p>

<pre><code>&lt;div onclick="window.location='http://tablelayout.com'"&gt;Some stuff...&lt;/div&gt;
</code></pre>

<p>While providing the &#8216;big link&#8217; I am looking for; This is many flavours of bad. The ideal solution is one that does not influence my HTML markup at all. </p>

<p>Instead we can use the JavaScript to add the desired &#8216;clickability&#8217; on top of nice semantic HTML. For example should I wish to make clicking anything contained by the <code>&lt;div&gt;</code> be equivalent to clicking the link it contains:</p>

<pre><code>&lt;div&gt;
    &lt;h4&gt;Title of some stuff&lt;h4&gt;
    &lt;p&gt;Introductory description of stuff... &lt;/p&gt;
    &lt;p&gt;&lt;a href="more-stuff.htm"&gt;More&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</code></pre>

<p>Using JavaScript to add the additional behaviour unobtrusively ensures you site is not broken without it and avoids the error prone redundancy created of duplicating the URL in HTML and JavaScript.</p>

<p>In essence this is what jquery.biggerlink does. Additionally it adds some classes to help you add some CSS to provide some link-like feedback to your newly fattened links, such as hover or focus.</p>

<p>Have a look at the <a href="/projects/jquery/biggerlink/">documentation</a> - it incorporates a simple demo at the bottom of the page.</p>

<p>I wrote this plugin for use at work. It is the product of a few Friday afternoons. During this time my employer, <a href="http://www.fusion.com.au">Fusion</a>, allows me and my fellow Fusionites to work on the internal projects that interest us most.</p>

<h3>What next</h3>

<p>Suggestions that might improve the usefulness or efficiency of this code are very welcome. It would be a great way for me to directly demonstrate to my employer one of the benefits of sharing work our work in this way.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>jDefault - Image resizing for your NetNewsWire style</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2007/aug/17/nnwstyle_jquery_template.html" />
    <id>tag:www.ollicle.com,2007://1.85</id>

    <published>2007-08-16T13:58:35Z</published>
    <updated>2010-05-28T07:55:58Z</updated>

    <summary>jDefault is a bare-bones NetNewsWire style that loads my image resizing JavaScript, and the jQuery library it uses, into the default NetNewsWire template. To &quot;enable&quot; any existing style built without a custom template.html file, simply replace the contained stylesheet.css with the corresponding file from your selected style.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>Some of you love the image resizing feature of my <a href="http://www.newsgator.com/Individuals/NetNewsWire/" title="NetNewsWire at Newsgator">NetNewsWire</a> style <a href="/2007/apr/25/delicious_netnewswire_style.html">Ollicle Reflex</a>, but would rather see it in a different style, perhaps one with your own particular CSS tweaks? If this sounds like familiar I&#8217;ve made a new NetNewsWire style package especially for you.</p>

<p>Project page: <a href="/projects/netnewswire/jdefault/">jDefault - NetNewsWire style JavaScript template</a></p>

<h2>Image resizing in an existing NetNewsWire style in a snap</h2>

<p>jDefault is a bare-bones NetNewsWire style that loads my image resizing JavaScript, and the <a href="http://jquery.com" title="jQuery site">jQuery</a> library it uses, into the default NetNewsWire template. To &#8216;enable&#8217; any existing style built without a custom template.html file, simply replace the contained stylesheet.css with the corresponding file from your selected style.</p>

<p><img src="/2007/aug/17/img/jDefault.jpg" height="265" width="590" alt="jDefault contents" title="jDefault contents" /></p>

<p>To expose the contents of the package, right (or control) click on jDefault.nnwstyle in the Finder and select &#8216;Show Package Contents&#8217;. Your existing NetNewsWire styles can be found in your user Library directory:</p>

<pre><code>~/Library/Application Support/NetNewsWire/StyleSheets/
</code></pre>

<p>Double-click your custom .nnwstyle file and NetNewsWire will install it by making a copy of it into this directory. If you are editing a style that is already installed you may need to restart NetNewsWire for the changes to take effect.</p>

<p><strong>A reminder</strong>: if you haven&#8217;t already, you need to enable JavaScript for news items in NetNewsWire&#8217;s preferences for this style to do anything remotely special:</p>

<ul>
<li>NetNewsWire Preferences
<ul>
<li>Browsing
<ul>
<li>News Items
<ul>
<li>Enable JavaScript</li>
</ul></li>
</ul></li>
</ul></li>
</ul>

<h2>Building your own JavaScript enabled nnwstyle with jDefault</h2>

<p>Of course if you are feeling more adventurous, you may wish to go further and use this template as a mere platform for a fresh custom style. Rename the .nnwstyle file to a name that takes your fancy. Replace my details in the contained Info.plist and share it with the world! I&#8217;d love to see what you come up with, and while you are in a <a href="http://ranchero.com/netnewswire/resources/styles.php">sharing mood</a> I&#8217;m sure <a href="http://inessential.com/">Brent would too</a>.</p>

<p>If you are making frequent changes it is worth making a static version of a feed to test in Safari. Right (or control) click in the feed display pane in NetNewsWire and select &#8216;Copy HTML Source&#8217; is the easiest way to grab the HTML you need. You will need to change the path to the imported stylesheet to suit your set-up.</p>

<h2>More on the imageFit jQuery plugin</h2>

<p>The contained jquery.imagefit.js is a complete rewrite of the JavaScript used in my previous NNW styles. For general tidiness and simple reuse it is written as a <a href="http://jquery.com/plugins/" title="jQuery plugin repository">jQuery plugin</a>. In a small way this is a sneak peek at the upcoming version of Ollicle Reflex.</p>

<p>It strikes me with all the web based feed aggregators popping up, this script may have a use on the web itself to keep unruly syndicated images under control. I am yet to test it in non-webkit browsers. In theory at least it ought to work in Firefox - but in it&#8217;s current form it won&#8217;t work in browsers that don&#8217;t support the CSS property max-width. Certainly not IE 6. </p>

<p>Please let me know if you give jquery.imagefit.js a spin elsewhere. If it holds up I&#8217;d like to add it at some point to the growing selection of jQuery plugins.</p>
]]>
        <![CDATA[<h3>18 August 2007</h3>

<p>Uploaded version 2 of jDefault. The updated package includes a slightly modification to jquery.imagefit.js. </p>

<p>Although I hadn&#8217;t seen problems with the previous version in NetNewsWire, the small change fixed an issue in Safari that became clear when I put up the <a href="/projects/jquery/imagefit/eg/">demo page for jquery.imagefit.js</a> earlier today.</p>

<h3>18 November 2007</h3>

<p><a href="http://factoryjoe.com/blog/">Chris Messina</a> has stepped up and adapted my imageFit plugin for use as a WordPress plugin. <a href="http://factoryjoe.com/blog/2007/11/17/wp-imagefit-proportionally-resizes-images-to-fit-your-blog-template/">WP-Imagefit</a> proportionally resizes images to fit your blog template.</p>

<p>So if you&#8217;re not chained to Movable Type like me (rebuilding this blog in MT 4 is hurting&#8230;) and are fond of occasionally posting overly wide images to your WordPress driven blog give it a go.</p>

<h3>5 May 2010</h3>

<p>Created a basic project page for the <a href="/projects/jquery/imagefit/">imagefit jQuery plugin</a>.</p>
]]>
    </content>
</entry>

<entry>
    <title>Safari 3 fix for Ollicle Reflex</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2007/jun/16/safari3_webkit_reflex.html" />
    <id>tag:www.ollicle.com,2007://1.84</id>

    <published>2007-06-16T09:54:34Z</published>
    <updated>2010-04-05T13:06:44Z</updated>

    <summary>Ollicle Reflex has been updated to fix an issue with the version of Webkit installed with the Safari 3 beta.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>If you are using my NetNewsWire style <a href="/2007/apr/25/delicious_netnewswire_style.html">Ollicle Reflex</a> and recently installed the <a href="http://www.apple.com/safari/">Safari 3 beta</a>, you may have noticed the style&#8217;s article title hide/show behaviour is broken (it no longer shows). Installing the new version of Safari also updates <a href="http://webkit.org/">Webkit</a> which other applications, such as <a href="http://www.newsgator.com/Individuals/NetNewsWire/">NetNewsWire</a>, incorporate to render HTML. Many thanks to <a href="http://thefragens.com/blog/">Andy</a> for bring this problem to my attention. </p>

<p>The good news is amending this only requires a small JavaScript amendment. I&#8217;ve updated Ollicle Reflex (version 5) to include this fix (no other changes).</p>

<p>I&#8217;m looking forward to experimenting with the Webkit update in my NetNewsWire styling endeavors. I expect to find many of the old frustrating bugs squashed. Fingers crossed too for poor old Brent, that some of the crashing bugs that have been plaguing <a href="http://ranchero.com/netnewswire/beta.php">NetNewsWire 3</a> combined view are resolved. Although, sadly, it will be some time before the version of Webkit bundled with Safari 2 can be disregarded.</p>
]]>
        <![CDATA[<h3>10 March 2008</h3>

<p>Another update with a bunch of improvements: <a href="/2008/mar/08/ollicle_reflex_netnewswire_style.html">Ollicle Reflex refined</a></p>
]]>
    </content>
</entry>

<entry>
    <title>Auto line-height: a jQuery plugin for flexible layouts</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2007/jun/03/jquery_lineheight_flexible.html" />
    <id>tag:www.ollicle.com,2007://1.83</id>

    <published>2007-06-03T02:35:53Z</published>
    <updated>2010-05-03T12:37:17Z</updated>

    <summary>I&apos;m very proud to present my first jQuery plugin: jquery.autolineheight. In a nutshell, this JavaScript adjusts the line-height of a container (such as a `div`) in proportion to it&apos;s width, relative to the font size. </summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>I&#8217;m very proud to present my first <a href="http://jquery.com">jQuery</a> plugin: jquery.autolineheight. In a nutshell, this JavaScript adjusts the line-height of a container (such as a <code>div</code>) in proportion to it&#8217;s width, relative to the font size. </p>

<p><a href="/projects/jquery/autolineheight/eg/">Demo of jquery.autolineheight</a>.</p>

<p>This is a rework of a script I wrote a while ago to do the same thing. You can read more about it and its purpose in the <a href="/2005/oct/12/javascript_flex_css.html">original post</a>. </p>

<h2>Download</h2>

<ul>
<li><a href="/projects/jquery/autolineheight/jquery.autolineheight.js">jquery.autolineheight.js</a> version 0.1</li>
</ul>

<p>Do what you like with this script. Of course, credits and/or links to <a href="http://www.ollicle.com">ollicle.com</a> are always welcome and encouraging!</p>

<h2>Requirements</h2>

<ul>
<li><p><a href="http://jquery.com">jQuery</a> version 1.1.2</p></li>
<li><p><a href="http://davecardwell.co.uk/javascript/jquery/plugins/jquery-em/">jQEm</a> version 0.2</p></li>
</ul>

<p>That original script didn&#8217;t require a JavaScript library to work. As a jQuery plugin this version obviously does, but with significant advantages as a result. My code for determining the relative font size has been discarded it favour of another jQuery plugin jQEm. My plugin inherits the ability of Dave Cardwell&#8217;s clever code to respond to <em>changes</em> in font size.</p>

<h2>Usage</h2>

<p>The best thing about packaging a reusable piece of JavaScript as a jQuery plugin is how easy it becomes to reuse it. With jQuery, jQEm and jquery.autolineheight all linked into the <code>HEAD</code> of your HTML page, very little further code is required to assign the behaviour to the desired element or elements in your page.</p>

<p>For example:</p>

<pre><code>&lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.jqem.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.autolineheight.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
     $(function(){
        $('#flexme').autolineheight();
     });
&lt;/script&gt;
</code></pre>

<p>Where &#8216;flexme&#8217; is the <code>id</code> of an element in your page whose contained text is to be fine tuned. </p>

<h2>Settings</h2>

<p>The above code will adjust the <code>line-height</code> based on a few sensible, easy reading, defaults written into the plugin for convenience. You may adjust these values to your taste and circumstance when you assign the behaviour to an element, for example:</p>

<pre><code>$('#flexme').autolineheight({minWidth:16,minLineHeight:1.2,ratio:.03});
</code></pre>

<p>Note the separating commas and the extra set of curly brackets. </p>

<p><code>minWidth</code> and <code>minLineHeight</code> combine to define the &#8216;tightest&#8217; end of the scale. These are the default values:</p>

<pre><code>minWidth: 15
minLineHeight: 1.4
</code></pre>

<p>If the assigned element has a width less than or equal to the <code>minWidth</code> (in ems) the value of <code>minLineHeight</code> is assigned as the <code>line-height</code>. If the element has a width greater than minWidth the <code>line-height</code> is increased with a multiplier:</p>

<pre><code>ratio: .02
</code></pre>

<p>The larger the value of <code>ratio</code> the &#8216;faster&#8217; the line-height will increase as the element is widened. </p>

<h2>Inheriting CSS</h2>

<p>It&#8217;s worth highlighting that this script will only override the line-height of elements it is explicitly assigned to. Contained elements will only inherit their parent&#8217;s line-height if they don&#8217;t have a line-height of their own set. For example with this CSS:</p>

<pre><code>body {line-height: 1.5}
p {line-height: 1}
</code></pre>

<p>And this HTML, where the autolineheight script has set the <code>line-height</code> of the <code>div</code> to 1</p>

<pre><code>&lt;body&gt;
    &lt;div id="flexme" style="line-height:2"&gt;
        &lt;p&gt;Some text&lt;/p&gt;
        &lt;p&gt;Some more text&lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;
</code></pre>

<p>The paragraphs will have a <code>line-height</code> of 1 as set in the CSS. Overruling both the <code>line-height</code> of the <code>body</code> and its parent <code>div</code>. If I was remove the CSS assigning the <code>line-height</code> to the <code>p</code>s they would inherit their <code>line-height</code> value from the next closest parent - in this case the <code>div</code>.</p>

<p>You can apply autolineheight to the <code>p</code>s directly with <code>$('p').autolineheight();</code> but that is less effecient than having the text elements inherit their line-heights from a containing <code>div</code>. </p>

<p>My decision to set unitless line-heights (rather than using % or px) is best explained by <a href="http://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/" title="Unitless line-heights">Eric Meyer</a>.</p>

<h2>Where from here</h2>

<p>I look forward to feedback from people actually using jquery.autolineheight in real projects. In the meantime I&#8217;m incubating a few more ideas for plugins that help with the presentation of content in &#8216;flexible&#8217; layouts and re-reading <a href="http://www.hunlock.com/blogs/Functional_Javascript">Functional Javascript</a> once (or twice) more.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Del.icio.us reflex</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2007/apr/25/delicious_netnewswire_style.html" />
    <id>tag:www.ollicle.com,2007://1.82</id>

    <published>2007-04-25T10:05:51Z</published>
    <updated>2010-05-28T08:00:24Z</updated>

    <summary>To thank everyone who spent the time to send me feedback on my NetNewsWire style, Ollicle Reflex, I&apos;m publishing a new version. It fixes a couple of popular problems and introduces some del.icio.us love.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>To thank everyone who spent the time to send me feedback on my NetNewsWire style, <a href="/2006/nov/28/jquery_netnewswire_style.html">Ollicle Reflex</a>, I&#8217;m publishing a new version. It fixes a couple of popular problems and introduces some <a href="http://del.icio.us" title="Social bookmarking">del.icio.us</a> love.</p>

<p><a href="/2007/apr/25/img/reflex-tags.jpg" title="Full size image"><img src="/2007/apr/25/img/reflex-tags-sml.jpg" alt="Displaying the top ten del.icio.us tags" title="" /></a></p>

<p>If you are not already familiar with what Ollicle Reflex has to offer NetNewsWire check out the <a href="/2006/nov/28/jquery_netnewswire_style.html">features detailed</a> on my previous post. Otherwise download it and find out for yourself.</p>

<h2>Download and install (Updated see: <a href="/2008/mar/08/ollicle_reflex_netnewswire_style.html">Ollicle Reflex refined</a>.)</h2>

<p class="ollicle">Download latest version: <a href="/projects/netnewswire/reflex/">Ollicle Reflex</a></p>

<p>I have removed the link to Ollicle Reflex Black. There is a <a href="/2008/mar/08/ollicle_reflex_netnewswire_style.html">new method</a> for setting Black as the default background.</p>

<p>Double-click the unzipped .nnwstyle file and NetNewsWire will copy it to where it needs to be. </p>

<pre><code>~/Library/Application Support/NetNewsWire/StyleSheets/
</code></pre>

<p>Like the original release, this style uses JavaScript to do some things CSS alone cannot. Make sure you enable it </p>

<ul>
<li>NetNewsWire Preferences 
<ul>
<li>Browsing 
<ul>
<li>News Items
<ul>
<li>Enable JavaScript </li>
</ul></li>
</ul></li>
</ul></li>
</ul>

<p>Requires at least NetNewsWire version 2.1 (<a href="http://www.newsgator.com/NGOLProduct.aspx?ProdId=NetNewsWire&amp;ProdView=lite">lite</a> or <a href="http://www.newsgator.com/NGOLProduct.aspx?ProdID=NetNewsWire">full</a>). The JavaScript driven magic of the style fails in NetNewsWire 2.0.1 - I have not spent the time to figure out why. Although, it does work nicely in the lovely <a href="http://ranchero.com/netnewswire/beta.php" title="Not even beta!">NetNewsWire 3 Sneak Peak Release</a>.</p>

<h2>Changes</h2>

<h3>Fixes</h3>

<ul>
<li><p>Cookied skin selections we&#8217;re failing to &#8216;stick&#8217; when using the style file name (e.g. &#8216;Ollicle Reflex black.nnwstyle&#8217;) to set the black skin by default.</p></li>
<li><p>Removed a poorly implemented &#8216;feature&#8217; which toggled the display of highlighted differences in feed content with cursor position. More on this below.</p></li>
</ul>

<h3>New features</h3>

<ul>
<li><p>Displays a del.icio.us <a href="http://del.icio.us/help/tagometer">Tagometer Badge</a> for each viewed news item. This shows you how many del.icio.us users have tagged the news item you are viewing and the top ten tags they used.</p></li>
<li><p>When NewNewsWires Highlight differences option is checked, items of deleted content are indicated with an inline &#9650;. Clicking each triangle toggles the display of that particular item of deleted content individually.</p></li>
</ul>

<h2>Some back story</h2>

<h3>Perseverance rewarded with tags</h3>

<p>Having recently worked out how to load <a href="http://jquery.com" title="JavaScript library">jQuery</a> into a NetNewsWire style, when I <a href="http://blog.del.icio.us/blog/2006/12/the_new_and_tag.html">read about</a> the introduction of the <a href="http://del.icio.us/help/json/url">del.icio.us JSON API</a>, I saw the potential for integrating it into a NNW style immediately. Figuring out the technical details to make it happen took me a lot longer. <a href="http://www.quirksmode.org/book/">PPK on JavaScript</a> helped me fill the necessary holes in my patchy JavaScript knowledge. It&#8217;s a wonderfully practical book I recommend to anyone struggling with the basics of JavaScript.</p>

<p>My perseverance was rewarded. The del.icio.us tags are particularly informative when viewing some del.icio.us generated feeds that are often lacking a useful descriptions. The top tags often tell me whether the bookmarked web page is one I wish investigate further or ignore.</p>

<p>It&#8217;s worth noting that feeds served up with <a href="http://www.feedburner.com/">feedburner</a>-redirected urls do not work. Because no one bookmarks feedburner urls on del.icio.us they will appear as &#8216;untagged&#8217; in Ollicle Reflex.</p>

<h3>When a feature becomes a bug</h3>

<p>NetNewsWire has a nifty feature named Highlight differences by its preference checkbox. Additions and deletions in the content of updated a posts are marked up with <code>ins</code> and <code>del</code> tags respectively. Although it&#8217;s often useful and interesting to see how an author has edited their posts - the red and green can be quite distracting to normal reading. </p>

<p>Reflex (and my previous styles) included a feature to hide and show these differences by moving your cursor over the body of the post. This confused many people who had not &#8216;read the manual&#8217; and understandably interpreted the occasionally frantic flickering as a bug.</p>

<p>Ultimately my implentation of this feature was too subtle; And the difference between a subtle feature and a bug is a fine one indeed. I have read advice to this affect from a number of software developers who have learnt this lesson the hard way. It&#8217;s enlightening to experience the problems caused by poorly advertised features first hand.</p>

<p>This version of Ollicle Reflex does away with the cursor over the body technique to instead require a directed mouse click from the user to display each deletion. Hopefully people will find this behaviour less mysterious.</p>
]]>
        <![CDATA[<h3>16 June 2007</h3>

<p>Updated to version 5 to <a href="/2007/jun/16/safari3_webkit_reflex.html">fix an issue</a> with the version of Webkit installed with the Safari 3 beta. Download above.</p>

<h3>10 March 2008</h3>

<p>Another update with a bunch of improvements: <a href="/2008/mar/08/ollicle_reflex_netnewswire_style.html">Ollicle Reflex refined</a></p>
]]>
    </content>
</entry>

<entry>
    <title>Reflex for NetNewsWire</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2006/nov/28/jquery_netnewswire_style.html" />
    <id>tag:www.ollicle.com,2006://1.81</id>

    <published>2006-11-28T11:26:45Z</published>
    <updated>2010-05-28T08:14:54Z</updated>

    <summary>Ollicle Reflex in an evolutionary improvement on my last NetNewsWire style - Ollicle Flex. Now updated to version 4.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>Ollicle Reflex in an evolutionary improvement on my last NetNewsWire style - <a href="/projects/netnewswire/#style4">Ollicle Flex</a>. </p>

<p>This style is designed to maximise legibility rather than add distracting &#8216;style&#8217; to your feed reading. Those who like a bit of colour and visual impact in their feed reading will appreciate it&#8217;s smart handling of full size photographs and comics.</p>

<p><a href="/2006/nov/28/img/reflex-white.jpg" title="Full size image"><img src="/2006/nov/28/img/reflex-white-sml.jpg" alt="With white background" title="" /></a> Default white background.</p>

<p><a href="/2006/nov/28/img/reflex-black.jpg" title="Full size image"><img src="/2006/nov/28/img/reflex-black-sml.jpg" alt="With black background" title="" /></a> Optional black background.</p>

<h2>Download and install (Updated see: <a href="/2008/mar/08/ollicle_reflex_netnewswire_style.html">Ollicle Reflex refined</a>.)</h2>

<p class="ollicle">Download latest version: <a href="/projects/netnewswire/reflex/">Ollicle Reflex</a></p>

<p>I have removed the link to Ollicle Reflex Black. There is a <a href="/2008/mar/08/ollicle_reflex_netnewswire_style.html">new method</a>.) for setting black as the default background.</p>

<p>Double-click the unzipped .nnwstyle file and NetNewsWire will copy it to where it needs to be. </p>

<pre><code>~/Library/Application Support/NetNewsWire/StyleSheets/
</code></pre>

<p>Like my previous release, this style uses JavaScript to do some things CSS alone cannot. Make sure you enable it </p>

<ul>
<li>NetNewsWire Preferences 
<ul>
<li>Browsing 
<ul>
<li>News Items
<ul>
<li>Enable JavaScript </li>
</ul></li>
</ul></li>
</ul></li>
</ul>

<p>Works great with the <a href="http://www.newsgator.com/NGOLProduct.aspx?ProdID=NetNewsWire">full version of NetNewsWire</a> or <a href="http://www.newsgator.com/NGOLProduct.aspx?ProdId=NetNewsWire&amp;ProdView=lite">lite</a>.</p>

<h2>Key features</h2>

<h3>Carried over from Flex (with improvements!)</h3>

<ul>
<li>Auto line-height to suit your selection of window layout (the loading &#8216;jump&#8217; has been minimised).</li>
<li>Images scale to fit window width (padding related stretching bug fixed).</li>
<li>Choice of two layouts (selection saved per feed).</li>
<li>Doesn&#8217;t interfere with your choice of font and text size.</li>
</ul>

<h3>Reflex introduces</h3>

<ul>
<li>A new preference &#8216;UI&#8217;.</li>
<li>Optional black background (nice for images).</li>
<li>Inline feed styles stripped for consistent feed legibility.</li>
<li>Some small tweaks to the display of images.</li>
<li>Fixed position news title now only appears when you scroll down the page.</li>
</ul>

<p>Mostly I continue to work on styles for NetNewsWire to please myself. Regardless, I am interested to hear your ideas on improving your reading experience.</p>

<h2>Behind the scenes</h2>

<h3>Timely challenge</h3>

<p>Initially one of my big struggles with introducing JavaScript into my NetNewsWire style was controlling when (if at all!) the script would fire. The Flex style does not perform any JavaScript until the content of the feed is loaded completely. I have a pretty quick internet connection, so it was rarely a matter of patience; Rather it was the &#8216;jump&#8217; after the images loaded that bothered me. At the time the only reliable techniques that worked for Safari/Webkit, that I could find, involved a timed delay to ensure the page would be <em>ready</em> to be manipulated by JavaScript. The text would still noticeably jump when the calculated line-height was applied.</p>

<h3>Finding the path</h3>

<p>Eventually a solution came to light that worked, but there was a problem applying the method to a NetNewsWire style. The technique relied on the JavaScript being linked into the head of the page as an external file. Simple when you are putting together a web page, but the style template NetNewsWire uses is limited to the contents of the body of the page. </p>

<p>I had a existing script to dynamically add an external file into a page, and it is a no-brainer to drop my JavaScript into its own file inside the .nnwstyle package. The tricky bit was finding the path to this file - the simple relative link doesn&#8217;t work and I couldn&#8217;t determine the full path without knowing the name of the user directory where the style package lives in advance. </p>

<h3>Frustrated potential</h3>

<p>The prospect of finding a means to load an external file was tantalising. It could provide a way to load a JavaScript library to make DOM scripting a bit more fun. I don&#8217;t enjoy wrestling JavaScript but I love getting things to work.  <a href="http://jquery.com">JQuery</a> in particular makes DOM scripting fun and also provided a solution to my initial script launching challenge. Too good to be true? It was until I found a way to load the file in the first place.</p>

<h3>Seeing the obvious</h3>

<p>It took awhile for my subconscious to get through to me and point to the answer under my nose. NetNewsWire was already determining the path to an external file residing in every style package - the CSS file! Two lines of JavaScript to read the content of the generated style tag and replace <code>stylesheet.css</code> with <code>javascript.js</code> and the path to the file was complete.</p>

<h3>Until next time</h3>

<p>My JavaScript is still a bit of a mess. I have not spent the time to rewrite my code as a showcase of the beauty jQuery can bring. I had to resist a strong temptation to put off sharing the style until I had polished it a little. Release early and often they say - so I figure I&#8217;ll release a shiny version next time - one day, maybe. </p>

<p>In the meantime it&#8217;s working for me - I hope it works for you!</p>
]]>
        <![CDATA[<h3>29 December 2006</h3>

<h4>New feature - Black skin default</h4>

<p>A significant number of you have politely requested a means to use the black skin by default. So I&#8217;ve spent a some of my hard earned holiday time to post a new version (3) of Ollicle Reflex with a trick up it&#8217;s sleeve.</p>

<p>You may change the default skin by changing the name of the unzipped file: </p>

<ul>
<li>for white use &#8216;Ollicle Reflex.nnwstyle&#8217; </li>
<li>for black use exactly &#8216;Ollicle Reflex black.nnwstyle&#8217;.</li>
</ul>

<p>Double-click the file to install it and you&#8217;re done!</p>

<p><strong>Note</strong>: JavaScript must be enabled for this bit of magic to work - see above.</p>

<p><strong>Also note</strong>: if you have a previous version of Reflex installed - installing the new version with the altered name will leave the older version in place. To remove NetNewsWire styles you can delete (or move) them from:</p>

<pre><code>~/Library/Application Support/NewNewsWire/StyleSheets/
</code></pre>

<p>If you make changes to files directly in this folder you will need to restart NetNewsWire to see the result.</p>

<h3>25 April 2007</h3>

<p>To thank everyone who spent the time to send me feedback on this style I&#8217;ve updated it. <a href="/2007/apr/25/delicious_netnewswire_style.html">The new version</a> fixes a couple of popular problems and introduces some del.icio.us love.</p>

<h3>10 March 2008</h3>

<p>Another update with a bunch of improvements: <a href="/2008/mar/08/ollicle_reflex_netnewswire_style.html">Ollicle Reflex refined</a></p>
]]>
    </content>
</entry>

<entry>
    <title>Quick accessibility fix with jQuery</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2006/nov/17/jquery_accessibility.html" />
    <id>tag:www.ollicle.com,2006://1.80</id>

    <published>2006-11-17T11:42:34Z</published>
    <updated>2010-04-05T08:11:46Z</updated>

    <summary>IE 7 has inherited the IE 6 problem with keyboard navigation and inline anchors. The otherwise time consuming fix was made simple with little a JavaScript - made even easier with jQuery. JavaScript to improve accessibility! Who would have thought...</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>IE 7 has inherited the IE 6 problem with <a href="http://juicystudio.com/article/ie-keyboard-navigation.php">keyboard navigation</a> and inline anchors. The otherwise time consuming fix was made simple with little a JavaScript - made even easier with <a href="http://jquery.com">jQuery</a>. JavaScript to improve accessibility! Who would have thought&#8230;</p>

<h2>The accessibility problem</h2>

<p>By using a keyboard I mean tapping  the <code>tab</code> key to move from link to link through a web page. This method works well to get until you want to skip some of the content by following a link to an anchor that is within the content of the page. The page will scroll down appropriately to the location of the anchor, but tapping <code>tab</code> once more to keep moving doesn&#8217;t always do what you may expect. Instead of moving the focus to the next link <em>after</em> the anchor it will move to a different link somewhere near the top of the page - often scrolling the page back up without regard for where you <em>thought</em> you were at in the page. This is disorienting to me - imagine what it is like for someone reliant on a screen reader to tell them what is happening on the screen!</p>

<h2>Two kinds of anchor</h2>

<p>The true nature of this problem seems to be obscured by the complexity of it&#8217;s triggers. Rather than attempt to figure it out definitively I&#8217;ll just stick to the problem I was experiencing. There are two kinds of destinations for same page anchors in my project:</p>

<ul>
<li><p>div elements which appear on every page to divide the page into meaningful chunks such as (navigation vs. content): <code>&lt;div id='templatesection'&gt;...</code> (these work fine);</p></li>
<li><p>And inline anchors which our client enters in throughout long pages of content to make it quicker to navigate  <code>&lt;a id='contentsection'&gt;&lt;/a&gt;</code> (uh oh, trouble).</p></li>
</ul>

<h2>The workaround</h2>

<p>To cut a longer story short you can fix it by wrapping a span around each inline anchor;</p>

<pre><code>&lt;span class='anchor'&gt;&lt;a id='contentsection'&gt;&lt;/a&gt;&lt;/span&gt;
</code></pre>

<p>and add a line to your CSS:</p>

<pre><code>.anchor {display:absolute;}
</code></pre>

<h2>Markup baggage</h2>

<p>Unfortunately the site I am working on has many hundreds of these anchors peppered through it&#8217;s content. Each one has been individually inserted by our client with the link tool sported by WYSIWYG toolbar of the site&#8217;s CMS. Even if we hacked the code of the toolbar to change the mark-up it produced when inserting anchors. It would be necessary to reinsert every one. </p>

<h2>Using jQuery to add the markup</h2>

<p>I was considering pestering one of our developers to do a bit of database search and replace monkeying when I realised how easy it would be to add the extra code with some jQuery driven JavaScript.</p>

<p>If you are like me - HTML and CSS savvy, but not quite up with the pack in the JavaScript department - jQuery is the shit when it comes to DOM scripting JavaScript libraries. I hope this little example helps communicate my enthusiasm for it.</p>

<h3>The code</h3>

<pre><code>$(document).ready(function(){
    $("a[@id]").not("[@href]").wrap("&lt;span class='anchor'&gt;&lt;/span&gt;");
});
</code></pre>

<p>That&#8217;s it! With the (pleasantly trim) jQuery library loaded, this script will find all the anchors in the page that have an <code>id</code> but no <code>href</code> and enclose each of them in a span with a class. </p>

<h3>Links in the chain</h3>

<p>To the uninitiated the code above will look arcane. Broken down it&#8217;s simple.</p>

<ol>
<li><p>This code ensures that any functions it contains are not fired until the DOM is ready - generally well before all the content (especially images) of the page is loaded.</p>

<pre><code>$(document).ready(function(){


});
</code></pre></li>
<li><p>Firstly I need to specify which elements in the document I wish to modify.  Let&#8217;s start with the most basic expression before narrowing it down. This tells jQuery (represented by the &#8216;$&#8217;) to find every <code>&lt;a&gt;</code> in the document. Just as in CSS where <code>a{};</code> refers to every <code>&lt;a&gt;</code>. </p>

<pre><code>$(document).ready(function(){
    $("a");
});
</code></pre></li>
<li><p>With a &#8216;selector&#8217; defined I can simply add to the <a href="http://jquery.com/docs/ChainableMethods/">chain</a> to manipulate each of those elements. This will add a span around every <code>&lt;a&gt;</code>:</p>

<pre><code>$(document).ready(function(){
    $("a").wrap("&lt;span class='anchor'&gt;&lt;/span&gt;");
});
</code></pre></li>
<li><p>Of course I don&#8217;t want to do that! This would do crazy things to the regular links in my page.  To discriminate between the links and anchors I need to be more specific. </p>

<p>My anchors each have an <code>id</code> assigned which I&#8217;m pretty sure the regular navigation links don&#8217;t have. So I can use that to refine the selector expression for jQuery.  Adding the square brackets immediately after the &#8216;a&#8217; in the expression provides a context to check something about this element in particular. Inside which, the <code>@</code> refers to an attribute of that element,  in this case it&#8217;s <code>id</code> attribute. All up <code>a[@id]</code> selects every <code>&lt;a&gt;</code> with any <code>id</code>:</p>

<pre><code>$(document).ready(function(){
    $("a[@id]").wrap("&lt;span class='anchor'&gt;&lt;/span&gt;");
});
</code></pre></li>
<li><p>Now my list of <code>&lt;a&gt;</code> elements in the page only includes those that have an <code>id</code>. I&#8217;m pretty sure I don&#8217;t have any regular links with <code>id</code>s&#8230; To be absolutely sure it would be a good idea to remove all the elements from this list that have a <code>href</code>. </p>

<p>This isn&#8217;t done by further refining the expression like I have done so far. Instead I am adding a <code>not()</code> to the chain - between the <code>$()</code> and the <code>wrap()</code>. This whittles down the list of elements found by the initial expression - <em>removing</em> any that match this further check before the list is passed along down the chain for &#8216;wrapping&#8217;.  The &#8216;not&#8217; expression should look familiar now - except this time we are checking for <code>href</code> instead of <code>id</code>. Also notice there is no need to include the <code>a</code> in this expression. The list of elements is already limited to those that have passed the first test:</p>

<pre><code>$(document).ready(function(){
    $("a[@id]").not("[@href]").wrap("&lt;span class='anchor'&gt;&lt;/span&gt;");
});
</code></pre></li>
</ol>

<p>Perhaps my explanation has puzzled your curiosity sufficiently to look at jQuery for yourself. Check out the <a href="http://jquery.com">official site</a>. It has <a href="http://jquery.com/docs/">excellent documentation</a> and <a href="http://jquery.com/docs/Plugins/">astounding plugins</a>. Even <a href="http://jquery.com/docs/AJAXModule/">AJAX</a> looks easy with jQuery!</p>

<h2>Medicine. but not a cure</h2>

<p>This coding cleverness doesn&#8217;t resolve the keyboard navigation problem for those of us unlucky enough to need to use Internet Explorer <em>without</em> JavaScript. Nor does it solve the same problem for Safari users - with or without JavaScript! Misuse has earned JavaScript a bad reputation when it comes to web accessibility. I hope this does a little to demonstrate it can be a power for good too.</p>
]]>
        <![CDATA[<h2>21 November 2006</h2>

<p>Seems this script breaks some anchors altogether in IE 6. So much for enhancing accessibility! I&#8217;ll be sure to post something here when I get to the bottom of it.</p>
]]>
    </content>
</entry>

<entry>
    <title>Goodbye</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2006/aug/23/sad_first_ipod.html" />
    <id>tag:www.ollicle.com,2006://1.79</id>

    <published>2006-08-22T15:38:01Z</published>
    <updated>2010-04-05T08:03:13Z</updated>

    <summary>This week I have had to say farewell to a dear friend.  Even though four years is a long time in iPod years, my iPod died before it&apos;s time with a nasty sounding clap on the footpath.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>This week I have had to say farewell to a dear friend. I bought my beautiful 5GB firewire wonder (aka olliPod) in January 2002. Since then my iPod has been by my side more often than not. The battery time wasn&#8217;t what it used to be and the hold switch was getting dicky, but these are the kind of flaws you forgive in those you love. It wasn&#8217;t these signs of age that killed it, but rather my tolerance of the overly worn belt clip that kept my tunes handy. Even though four years is a long time in iPod years, my iPod died before it&#8217;s time with a nasty sounding clap on the footpath. </p>

<p>That night, after a quiet day, upon connecting the firewire, I was startled by a loud click and a series of ominous icons, fatally concluded with the graphic of a <a href="http://the.taoofmac.com/space/blog/2005-05-08">sad face</a> of an iPod. </p>

<p>I&#8217;m missing my daily dose from the <a href="http://www.escapepod.org/">Escape Pod</a> back catalog, and keeping up with the <a href="http://www.abc.net.au/rn/scienceshow/default.htm">Science Show</a> is a little more difficult; So it won&#8217;t be long before I start thinking seriously about a replacement. It&#8217;s funny to think for the price I payed for my first generation iPod I could now buy a 60GB and a couple of 1GB shuffles with the change. Even so, I&#8217;m still hesitant to replace my friend before it&#8217;s clear what Apple has up their sleeve for the next generation.</p>
]]>
        

    </content>
</entry>

</feed>
