modifying the way links work in page
Posted by ark, ,
This post is now out of date: please go read about the new 'fixlinks.js'.

So I really dislike adding target="_blank" to all my links that go offsite or adding <base target="blank"> and to remembering unset for links that stay on site.

So I added little bit javascript top of my template I call an onload
body tag that modifies all the <a href> tags on the page. It
runs with following logic. If the link is different anonymize using google url
redirector and open a new tab if it's the same host replace this window. At
some point I'll fix it to honor target="_blank" attribute in the <a href>
if there is one.