From f33d78f6a4366358d6cf7377796988bb56808376 Mon Sep 17 00:00:00 2001 From: Abdelkarim Djelalda Date: Wed, 6 Jul 2022 01:44:50 +0100 Subject: [PATCH 1/2] Integrate Reveddit with deleted comments --- inc/compilePostComments.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/inc/compilePostComments.js b/inc/compilePostComments.js index 6840d76..8cae6c5 100644 --- a/inc/compilePostComments.js +++ b/inc/compilePostComments.js @@ -5,10 +5,14 @@ module.exports = function() { let comments_html function commentAuthor(comment, classlist, submitter, moderator) { let classes = classlist.join(' ') - if (comment.author === '[deleted]') - return `[deleted]` - else + if (comment.author === '[deleted]') { + var reveddit_url = "https://www.reveddit.com" + post_url.substr(post_url.indexOf('/r/')) + comments.id + return `[deleted]` + } + + else { return `${comment.author}${submitter || ''}${moderator || ''}` + } } if(!user_preferences) From f7082acc41344e0fbb7b86ef22c353239ebce3f3 Mon Sep 17 00:00:00 2001 From: Abdelkarim Djelalda Date: Thu, 7 Jul 2022 14:35:31 +0100 Subject: [PATCH 2/2] change deleted user's comment to #cc6a6a --- inc/compilePostComments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/compilePostComments.js b/inc/compilePostComments.js index 8cae6c5..98d3584 100644 --- a/inc/compilePostComments.js +++ b/inc/compilePostComments.js @@ -7,7 +7,7 @@ module.exports = function() { let classes = classlist.join(' ') if (comment.author === '[deleted]') { var reveddit_url = "https://www.reveddit.com" + post_url.substr(post_url.indexOf('/r/')) + comments.id - return `[deleted]` + return `[deleted]` } else {