From 0cb37de5a752f3d4a18411d4e1a619daf84e0957 Mon Sep 17 00:00:00 2001 From: Adhityaa Date: Mon, 11 Jun 2018 00:40:34 +0530 Subject: [PATCH] commento.js: remove oauth only if it exists --- frontend/js/commento.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/frontend/js/commento.js b/frontend/js/commento.js index dfee7f9..fb69da1 100644 --- a/frontend/js/commento.js +++ b/frontend/js/commento.js @@ -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,9 +1083,11 @@ loginBoxType = "login"; - remove(hr); - remove(oauthPretext); - remove(oauthButtonsContainer); + if (configuredOauths.length > 0) { + remove(hr); + remove(oauthPretext); + remove(oauthButtonsContainer); + } } global.signupSwitch = function() { @@ -1156,9 +1157,11 @@ remove(emailButton); remove(loginLinkContainer); if (loginBoxType == "signup") { - remove(hr); - remove(oauthPretext); - remove(oauthButtonsContainer); + if (configuredOauth.length > 0) { + remove(hr); + remove(oauthPretext); + remove(oauthButtonsContainer); + } } var order, id, type, placeholder;