mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-31 12:23:48 +01:00
Show correct time on external preview
allowed to work with local-time.js
This commit is contained in:
parent
3e70902d06
commit
a976c46a76
@ -181,12 +181,12 @@ onready(function(){
|
||||
return (i === 0) ? bytes +' '+ sizes[i] : (bytes / Math.pow(1024, i)).toFixed(2) +' ' +sizes[i];
|
||||
};
|
||||
|
||||
var time = (!localStorage.show_relative_time || localStorage.show_relative_time === 'false') ? dateformat(new Date(data.time)) : timeDifference(Date.now(), data.time);
|
||||
var time = (!localStorage.show_relative_time || localStorage.show_relative_time === 'false') ? dateformat(new Date(data.time*1000)) : timeDifference(Date.now(), data.time*1000);
|
||||
var $post = $('<div class="post reply hidden" id="reply_'+ data.no +'">')
|
||||
.append($('<p class="intro"></p>')
|
||||
.append('<span class="name">'+ data.name +'</span> ')
|
||||
.append('<time>'+ time +'</time>')
|
||||
.append('<a class="post_no">No.'+ data.no +'</a>')
|
||||
.append('<time datetime="'+ new Date(data.time*1000).toISOString() +'">'+ time +'</time>')
|
||||
.append('<a class="post_no"> No.'+ data.no +'</a>')
|
||||
)
|
||||
.append($('<div class="body"></div>')
|
||||
.html(data.com)
|
||||
|
Loading…
x
Reference in New Issue
Block a user