commento.js: remove oauth only if it exists

This commit is contained in:
Adhityaa 2018-06-11 00:40:34 +05:30
parent b2b7f59356
commit 0cb37de5a7

View File

@ -1053,9 +1053,8 @@
append(loginLinkContainer, loginLink);
append(loginBox, loginLinkContainer);
append(loginBox, hr);
if (configuredOauths.length > 0) {
append(loginBox, hr);
append(loginBox, oauthPretext);
append(oauthButtonsContainer, oauthButtons);
append(loginBox, oauthButtonsContainer);
@ -1084,10 +1083,12 @@
loginBoxType = "login";
if (configuredOauths.length > 0) {
remove(hr);
remove(oauthPretext);
remove(oauthButtonsContainer);
}
}
global.signupSwitch = function() {
loginBoxClose();
@ -1156,10 +1157,12 @@
remove(emailButton);
remove(loginLinkContainer);
if (loginBoxType == "signup") {
if (configuredOauth.length > 0) {
remove(hr);
remove(oauthPretext);
remove(oauthButtonsContainer);
}
}
var order, id, type, placeholder;