mirror of
https://codeberg.org/teddit/teddit
synced 2025-02-16 20:20:36 +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) {
|
if(!morechildren_ids) {
|
||||||
let load_comms_href = parent_id
|
let load_comms_href = parent_id
|
||||||
|
|
||||||
if(viewing_comment)
|
|
||||||
load_comms_href = '../' + parent_id
|
|
||||||
|
|
||||||
comments_html = `
|
comments_html = `
|
||||||
<div class="load-more-comments">
|
<div class="load-more-comments">
|
||||||
<a href="${load_comms_href}#c">load more comments (${comments.count})</a>
|
<a href="${load_comms_href}#c">load more comments (${comments.count})</a>
|
||||||
@ -92,8 +89,11 @@ module.exports = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
let link = comments.parent_id.split('_')[1]
|
||||||
comments_html = `
|
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 parent_id = comment.parent_id.split('_')[1]
|
||||||
let load_comms_href = parent_id
|
let load_comms_href = parent_id
|
||||||
|
|
||||||
if(viewing_comment)
|
|
||||||
load_comms_href = '../' + parent_id
|
|
||||||
|
|
||||||
comments_html += `
|
comments_html += `
|
||||||
<div class="load-more-comments">
|
<div class="load-more-comments">
|
||||||
<a href="${load_comms_href}#c">load more comments (${comment.count})</a>
|
<a href="${load_comms_href}#c">load more comments (${comment.count})</a>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
} else {
|
} else {
|
||||||
comments_html += `
|
let link = comment.parent_id.split('_')[1]
|
||||||
|
comments_html = `
|
||||||
<div class="load-more-comments">
|
<div class="load-more-comments">
|
||||||
<a href="${comment.id}">continue this thread</a>
|
<a href="${link}/#c">continue this thread</a>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user