From 3b948129738577b1ff655cef178bb4b247e4aaef Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 25 Jul 2023 21:41:24 +0300 Subject: [PATCH] remove ghost-town-box when making a comment --- files/assets/js/comments_v.js | 3 +++ files/templates/util/macros.html | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/files/assets/js/comments_v.js b/files/assets/js/comments_v.js index 6310f5fcb..7bf5b9b41 100644 --- a/files/assets/js/comments_v.js +++ b/files/assets/js/comments_v.js @@ -283,6 +283,9 @@ function post_comment(fullname, hide){ input.previousElementSibling.innerHTML = ''; input.value = null; oldfiles[ta.id] = [] + + const ghost_town_box = document.getElementById('ghost-town-box') + if (ghost_town_box) ghost_town_box.remove() } else { showToast(false, getMessageFromJsonData(false, data)); diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index 034dae8a2..ec2309c6b 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -167,7 +167,7 @@ {% macro ghost_box(text1, text2, mode, extra_css) %} {# TODO: use in saved (search for "fa-ghost" in source) #} {% if mode == 1 %} -
+
@@ -181,7 +181,7 @@ {% endif %}
{% elif mode == 2 %} -
+

{{text1|safe}}