mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-25 16:49:26 +01:00
collapse only 1st level child comments automatically if collapse_child_comments preference is true
This commit is contained in:
parent
b9d93d4c15
commit
22efb3e380
@ -45,7 +45,7 @@ module.exports = function() {
|
|||||||
}
|
}
|
||||||
comments_html = `
|
comments_html = `
|
||||||
<div class="comment ${comments.depth % 2 === 0 ? 'even-depth' : 'odd-depth'}" id="${comments.id}">
|
<div class="comment ${comments.depth % 2 === 0 ? 'even-depth' : 'odd-depth'}" id="${comments.id}">
|
||||||
<details ${user_preferences.collapse_child_comments === 'true' && comments.depth > 0 ? '' : 'open'}>
|
<details ${user_preferences.collapse_child_comments === 'true' && comments.depth > 0 && comments.depth < 2 ? '' : 'open'}>
|
||||||
<summary>
|
<summary>
|
||||||
<p class="author">${commentAuthor(comments, classlist, submitter && submitter_link, moderator && moderator_badge)}</p>
|
<p class="author">${commentAuthor(comments, classlist, submitter && submitter_link, moderator && moderator_badge)}</p>
|
||||||
<p class="ups">${ups}</p>
|
<p class="ups">${ups}</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user