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