mirror of
https://codeberg.org/teddit/teddit
synced 2025-01-31 03:25:11 +01:00
Integrate Reveddit with deleted comments
This commit is contained in:
parent
74625f39b7
commit
f33d78f6a4
@ -5,10 +5,14 @@ module.exports = function() {
|
|||||||
let comments_html
|
let comments_html
|
||||||
function commentAuthor(comment, classlist, submitter, moderator) {
|
function commentAuthor(comment, classlist, submitter, moderator) {
|
||||||
let classes = classlist.join(' ')
|
let classes = classlist.join(' ')
|
||||||
if (comment.author === '[deleted]')
|
if (comment.author === '[deleted]') {
|
||||||
return `<span class="${classes}">[deleted]</span>`
|
var reveddit_url = "https://www.reveddit.com" + post_url.substr(post_url.indexOf('/r/')) + comments.id
|
||||||
else
|
return `<span class="${classes}"><a href="${reveddit_url}" style='color: red !important;'>[deleted]</a></span>`
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
return `<a href="/u/${comment.author}" class="${classes}">${comment.author}</a>${submitter || ''}${moderator || ''}`
|
return `<a href="/u/${comment.author}" class="${classes}">${comment.author}</a>${submitter || ''}${moderator || ''}`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!user_preferences)
|
if(!user_preferences)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user