Aevann 2024-04-20 02:00:29 +02:00
parent e47d40b0bb
commit f859d36e07
2 changed files with 10 additions and 0 deletions

View File

@ -39,4 +39,12 @@ function collapse_comment(id) {
const ta = document.getElementById('markdown-c_'+id);
if (ta && !ta.classList.contains('d-none'))
expandMarkdown(`c_${id}`)
if (closed) {
const children_count = document.getElementById(`replies-of-c_${id}`).getElementsByClassName('comment-body').length
document.getElementById(`children-count-${id}`).innerHTML = ` (${children_count} children)`
}
else {
document.getElementById(`children-count-${id}`).innerHTML = ''
}
};

View File

@ -278,6 +278,8 @@
{% if c.blackjack_result %}
{{c.blackjack_html | safe}}
{% endif %}
<span id="children-count-{{c.id}}" class="vertical-align ml-1"></span>
</div>
{{macros.reports(c, 'comment')}}