Merge pull request #10 from gunjanraval/master

Update comment.js
This commit is contained in:
Tony Yang 2019-10-09 22:36:20 +08:00 committed by GitHub
commit f110472437
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ function fetchComments() {
let data = res.data;
let t = new Date(data.fetch);
post.fetchTime = Math.ceil(data.fetch / 1000); // php timestamp
$('span.fetch.time').text(`Last fetch: ${t.getHours()}:${ t.getMinutes() < 10 ? '0' + t.getMinutes() : t.getMinutes() }`);
$('span.fetch.time').text(`Last fetch: ${t.getHours() < 10 ? '0' + t.getHours() : t.getHours()}:${ t.getMinutes() < 10 ? '0' + t.getMinutes() : t.getMinutes() }`);
parseComments(data);
}).catch(function (error) {
if (error.response) {