From 672863b48fc93ec65d6dda71d9b7b75bfc31a962 Mon Sep 17 00:00:00 2001 From: Adhityaa Chandrasekar Date: Sat, 13 Apr 2019 21:18:28 -0400 Subject: [PATCH] commento.js: use question mark for anonymous comments --- frontend/js/commento.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/js/commento.js b/frontend/js/commento.js index a7df3a5..cc10ed3 100644 --- a/frontend/js/commento.js +++ b/frontend/js/commento.js @@ -732,7 +732,14 @@ if (commenter.photo === "undefined") { avatar = create("div"); avatar.style["background"] = color; - avatar.innerHTML = commenter.name[0].toUpperCase(); + + if (comment.commenterHex === "anonymous") { + avatar.innerHTML = "?"; + avatar.style["font-weight"] = "bold"; + } else { + avatar.innerHTML = commenter.name[0].toUpperCase(); + } + classAdd(avatar, "avatar"); } else { avatar = create("img");