mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-08-01 19:16:13 -04:00
allow disabling comment date display using discussiondatedisplay
configuration option
This commit is contained in:
parent
5421e8e558
commit
0f9158b37b
7 changed files with 31 additions and 14 deletions
|
@ -196,7 +196,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
*/
|
||||
this.getCreated = function()
|
||||
{
|
||||
return this.meta[this.v === 1 ? 'postdate' : 'created'];
|
||||
return this.meta[this.v === 1 ? 'postdate' : 'created'] || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3484,9 +3484,11 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
}
|
||||
|
||||
// set date
|
||||
const created = comment.getCreated();
|
||||
const commentDate = created == 0 ? '' : ' (' + (new Date(created * 1000).toLocaleString()) + ')';
|
||||
$commentEntry.find('span.commentdate')
|
||||
.text(' (' + (new Date(comment.getCreated() * 1000).toLocaleString()) + ')')
|
||||
.attr('title', 'CommentID: ' + comment.id);
|
||||
.text(commentDate)
|
||||
.attr('title', 'CommentID: ' + comment.id);
|
||||
|
||||
// if an avatar is available, display it
|
||||
const icon = comment.getIcon();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue