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