// Generated by CoffeeScript 1.6.2 (function() { var hrefliBase, isExternal; hrefliBase = 'http://href.li/?'; String.prototype.startsWith = function(comparison) { return this.substring(0, comparison.length) === comparison; }; isExternal = function(href) { if (!href.match(/^https?:\/\//)) { return false; } if (href.startsWith(hrefliBase)) { return false; } if (href.startsWith(location.origin)) { return false; } return true; }; jQuery(function($) { return $('body').on('mousedown', 'a', function() { var $this, originalLink; originalLink = this.href; if (!isExternal(originalLink)) { return; } $this = $(this); $this.attr('href', "" + hrefliBase + originalLink); return setTimeout(function() { return $this.attr('href', originalLink); }, 1); }); }); }).call(this);