From c1c55f638aaeaf7f4e4d8791957ef2fa828e61cf Mon Sep 17 00:00:00 2001 From: Ricky Ramirez Date: Wed, 15 May 2013 14:51:38 -0700 Subject: [PATCH] login.js: Redirect appropriately from login popup. The login popup redirects to a link's href if one is present. This works for all links, except for the login link which is hrefed to /login for middle clickability. This ignores the login href specifically which results in the current page being reloaded correctly. --- r2/r2/public/static/js/login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/public/static/js/login.js b/r2/r2/public/static/js/login.js index db8667b12..f9f0be478 100644 --- a/r2/r2/public/static/js/login.js +++ b/r2/r2/public/static/js/login.js @@ -119,7 +119,7 @@ r.login.ui = { var el = $(e.target), href = el.attr('href'), dest - if (href && href != '#') { + if (href && href != '#' && !/\/login\/?$/.test(href)) { // User clicked on a link that requires login to continue dest = href } else {