From f33d78f6a4366358d6cf7377796988bb56808376 Mon Sep 17 00:00:00 2001 From: Abdelkarim Djelalda Date: Wed, 6 Jul 2022 01:44:50 +0100 Subject: [PATCH] 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)