Merge pull request #8489 from raisedadead/fix/sign-in-buttons
Fix Sign in Buttons
This commit is contained in:
@ -41,7 +41,7 @@ block content
|
|||||||
}
|
}
|
||||||
$.each($(btnSelector), function(i, item) {
|
$.each($(btnSelector), function(i, item) {
|
||||||
if (
|
if (
|
||||||
$(item).attr('href') === obj.methodLink &&
|
$(item).text() === obj.method &&
|
||||||
$(item).hasClass(obj.methodClass)
|
$(item).hasClass(obj.methodClass)
|
||||||
) {
|
) {
|
||||||
$(item).addClass('active');
|
$(item).addClass('active');
|
||||||
@ -55,7 +55,11 @@ block content
|
|||||||
var obj = {};
|
var obj = {};
|
||||||
$(this).removeClass('active');
|
$(this).removeClass('active');
|
||||||
obj.methodClass = $(this).attr('class').split(' ').pop();
|
obj.methodClass = $(this).attr('class').split(' ').pop();
|
||||||
obj.methodLink = $(this).attr('href');
|
obj.method = $(this).text();
|
||||||
localStorage.setItem('lastSigninMethod', JSON.stringify(obj));
|
if(obj.method === "Sign in with Email" || obj.method === "Sign in with GitHub") {
|
||||||
|
localStorage.setItem('lastSigninMethod', JSON.stringify(obj));
|
||||||
|
} else {
|
||||||
|
localStorage.removeItem('lastSigninMethod');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user