From 220109a157428d57303098d5b14d6e005eb9ea6e Mon Sep 17 00:00:00 2001 From: Adhityaa Chandrasekar Date: Mon, 18 Feb 2019 16:58:10 -0500 Subject: [PATCH] commento.js: close login box when logged in --- frontend/js/commento.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/frontend/js/commento.js b/frontend/js/commento.js index 2f0039e..1b4935d 100644 --- a/frontend/js/commento.js +++ b/frontend/js/commento.js @@ -1133,9 +1133,14 @@ attrSet(loggedContainer, "style", ""); } - global.commentNew(id, resp.commenterToken, function() { + remove($(ID_LOGIN)); + if (id !== null) { + global.commentNew(id, resp.commenterToken, function() { + global.loginBoxClose(); + }); + } else { global.loginBoxClose(); - }); + } }); } }, 250); @@ -1291,9 +1296,14 @@ attrSet(loggedContainer, "style", ""); } - global.commentNew(id, resp.commenterToken, function() { + remove($(ID_LOGIN)); + if (id !== null) { + global.commentNew(id, resp.commenterToken, function() { + global.loginBoxClose(); + }); + } else { global.loginBoxClose(); - }); + } }); }