Fixed a bug which prevented login in private mode (safari)
This commit is contained in:
parent
0780cab414
commit
e10c087925
@ -119,13 +119,22 @@ var lychee = {
|
||||
|
||||
params = "login&user=" + user + "&password=" + password;
|
||||
lychee.api(params, function(data) {
|
||||
|
||||
if (data===true) {
|
||||
localStorage.setItem("lychee_username", user);
|
||||
|
||||
// Use 'try' to catch a thrown error when Safari is in private mode
|
||||
try { localStorage.setItem("lychee_username", user); }
|
||||
|
||||
window.location.reload();
|
||||
|
||||
} else {
|
||||
|
||||
// Show error and reactive button
|
||||
$("#password").val("").addClass("error").focus();
|
||||
$(".message .button.active").removeClass("pressed");
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user