From 186d8facb34b6dc03aeac8d22f211767485486de Mon Sep 17 00:00:00 2001 From: teddit Date: Mon, 4 Jan 2021 20:38:12 +0100 Subject: [PATCH] fix 'load more comments (n)' and 'continue this thread' links #82 --- inc/compilePostComments.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/inc/compilePostComments.js b/inc/compilePostComments.js index 0fd9aa7..5639d36 100644 --- a/inc/compilePostComments.js +++ b/inc/compilePostComments.js @@ -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 = `
load more comments (${comments.count}) @@ -92,8 +89,11 @@ module.exports = function() { } } } else { + let link = comments.parent_id.split('_')[1] comments_html = ` - continue this thread + ` } } @@ -165,9 +165,6 @@ module.exports = function() { if(comment.children.length > 0) { let parent_id = comment.parent_id.split('_')[1] let load_comms_href = parent_id - - if(viewing_comment) - load_comms_href = '../' + parent_id comments_html += `
@@ -175,9 +172,10 @@ module.exports = function() {
` } else { - comments_html += ` + let link = comment.parent_id.split('_')[1] + comments_html = ` ` }