Update comment.js

This commit is contained in:
Gunjan Rawal 2019-10-09 20:03:35 +05:30 committed by GitHub
parent 4df03b1427
commit 5819fd9524
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 data = res.data;
let t = new Date(data.fetch); let t = new Date(data.fetch);
post.fetchTime = Math.ceil(data.fetch / 1000); // php timestamp 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); parseComments(data);
}).catch(function (error) { }).catch(function (error) {
if (error.response) { if (error.response) {
@ -327,4 +327,4 @@ function snackbar(message) {
ts('.snackbar').snackbar({ ts('.snackbar').snackbar({
content: message content: message
}); });
} }