You can inspect their Javascript and cookies with the Chrome Developer Tools or Firebug for Firefox.
It looks like they're adding an "onclick" event to links, which stores the recent history in the "<username>_recentclicks2" cookie as '%' delimited story IDs.
If you add an "onclick" event to a link it will fire before the browser changes the page, in the same way an "onsubmit" will fire before a FORM submits.
Code:
<a href="http://google.com" onclick="alert('You clicked me. Now redirecting you!');">Click me</a>
The same is true of click events that you bind using jQuery.