mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-22 14:59:26 +01:00
fix 'load more comments (n)' and 'continue this thread' links #82
This commit is contained in:
parent
e64cbeff71
commit
186d8facb3
@ -72,9 +72,6 @@ module.exports = function() {
|
||||
if(!morechildren_ids) {
|
||||
let load_comms_href = parent_id
|
||||
|
||||
if(viewing_comment)
|
||||
load_comms_href = '../' + parent_id
|
||||
|
||||
comments_html = `
|
||||
<div class="load-more-comments">
|
||||
<a href="${load_comms_href}#c">load more comments (${comments.count})</a>
|
||||
@ -92,8 +89,11 @@ module.exports = function() {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let link = comments.parent_id.split('_')[1]
|
||||
comments_html = `
|
||||
<a href="${comments.id}/">continue this thread</a>
|
||||
<div class="load-more-comments">
|
||||
<a href="${link}/#c">continue this thread</a>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
}
|
||||
@ -166,18 +166,16 @@ module.exports = function() {
|
||||
let parent_id = comment.parent_id.split('_')[1]
|
||||
let load_comms_href = parent_id
|
||||
|
||||
if(viewing_comment)
|
||||
load_comms_href = '../' + parent_id
|
||||
|
||||
comments_html += `
|
||||
<div class="load-more-comments">
|
||||
<a href="${load_comms_href}#c">load more comments (${comment.count})</a>
|
||||
</div>
|
||||
`
|
||||
} else {
|
||||
comments_html += `
|
||||
let link = comment.parent_id.split('_')[1]
|
||||
comments_html = `
|
||||
<div class="load-more-comments">
|
||||
<a href="${comment.id}">continue this thread</a>
|
||||
<a href="${link}/#c">continue this thread</a>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user