// Generated by CoffeeScript 1.6.1 (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() { if (isExternal(this.href)) { return $(this).attr('href', "" + hrefliBase + this.href); } }); }); }).call(this);