mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user