Merge pull request 'Integrate Reveddit with deleted comments' (#329) from piislide/teddit:main into main

Reviewed-on: https://codeberg.org/teddit/teddit/pulls/329
This commit is contained in:
teddit 2022-07-07 14:43:23 +02:00
commit 7ef04def16
1 changed files with 7 additions and 3 deletions

View File

@ -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 `<span class="${classes}">[deleted]</span>`
else
if (comment.author === '[deleted]') {
var reveddit_url = "https://www.reveddit.com" + post_url.substr(post_url.indexOf('/r/')) + comments.id
return `<span class="${classes}"><a href="${reveddit_url}" style='color: #cc6a6a !important;'>[deleted]</a></span>`
}
else {
return `<a href="/u/${comment.author}" class="${classes}">${comment.author}</a>${submitter || ''}${moderator || ''}`
}
}
if(!user_preferences)