#317 last_status type
This commit is contained in:
parent
80ce93785a
commit
31cc929c68
|
@ -1,6 +1,9 @@
|
|||
//日付パーサー
|
||||
function date(str, datetype) {
|
||||
if (datetype == "relative") {
|
||||
function date(str, datetype, lastStatus) {
|
||||
if (lastStatus) {
|
||||
var date = new Date(str)
|
||||
return date.getFullYear() + "/" + (date.getMonth() + 1) + "/" + date.getDate()
|
||||
} else if (datetype == "relative") {
|
||||
return '<time class="timeago" datetime="' + str + '"></time>'
|
||||
} else {
|
||||
var date = new Date(str)
|
||||
|
|
|
@ -1319,7 +1319,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
|
|||
} else {
|
||||
var udg = `<a onclick="udg('${toot.id}','${acct_id}');" user="${toot.acct}" class="udg">`
|
||||
}
|
||||
var latest = date(toot.last_status_at, 'relative')
|
||||
var latest = date(toot.last_status_at, 'relative', true)
|
||||
if (toot.last_status_at) {
|
||||
var latesthtml = `<div class="cbadge" style="width:100px;">Last <span class="voice">toot</span>: ${latest}</div>`
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user