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