WIP: to null-safety app

This commit is contained in:
cutls 2019-12-12 00:06:40 +09:00
parent 320576f288
commit 9f6c14ced0
2 changed files with 19 additions and 6 deletions

View File

@ -211,6 +211,21 @@ function escapeCsv(str) {
}
return result
}
function evalAttr(json, attr, lenCk) {
if (json[attr]) {
if (lenCk) {
if (json[attr][0]) {
return true
} else {
return false
}
} else {
return true
}
} else {
return false
}
}
function statusModel(now) {
if (!now) {
var now = new Date().toString()
@ -248,12 +263,10 @@ function statusModel(now) {
locked: false,
bot: false,
created_at: now,
note:
'',
note: '',
url: '',
avatar: '',
avatar_static:
'',
avatar_static: '',
header: '',
header_static: '',
followers_count: 0,

View File

@ -151,7 +151,7 @@ function media(b64, type, no) {
mediav = mediav.replace(regExp, json['id'])
$('#media').val(mediav)
}
if (img == 'url') {
if (img == 'url' && json['text_url']) {
$('#textarea').val($('#textarea').val() + ' ' + json['text_url'])
}
todc()