From 49e28f9d1e9a6ee0be78c9e62229cffaedd90150 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 25 Sep 2013 11:25:48 -0400 Subject: [PATCH] fixing bug where outgoing links didn't actually let you leave... oops! --- public/src/ajaxify.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index 57e94c03dc..1421b494b1 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -117,12 +117,14 @@ var ajaxify = {}; if (!e.ctrlKey && e.which === 1) { if (this.host === window.location.host) { + // Internal link var url = this.href.replace(rootUrl + '/', ''); if (ajaxify.go(url)) { e.preventDefault(); } - } else { + } else if (window.location.pathname !== '/outgoing') { + // External Link ajaxify.go('outgoing?url=' + encodeURIComponent(this.href)); e.preventDefault(); }