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:
commit
7ef04def16
|
@ -5,11 +5,15 @@ 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)
|
||||
user_preferences = {}
|
||||
|
|
Loading…
Reference in New Issue