Merge pull request #32 from Thra11/show-boosted-attachments
Fix #30: display attachments from boosted toots
This commit is contained in:
commit
7b834966fb
1 changed files with 13 additions and 0 deletions
|
@ -252,5 +252,18 @@ function parseToot (data){
|
||||||
}
|
}
|
||||||
item['attachments'].push(tmp)
|
item['attachments'].push(tmp)
|
||||||
}
|
}
|
||||||
|
if(item['status_reblog']){
|
||||||
|
for(var i = 0; i < data['reblog']['media_attachments'].length ; i++){
|
||||||
|
var attachments = data['reblog']['media_attachments'][i];
|
||||||
|
item['content'] = item['content'].replaceAll(attachments['text_url'], '')
|
||||||
|
var tmp = {
|
||||||
|
id: attachments['id'],
|
||||||
|
type: attachments['type'],
|
||||||
|
url: attachments['remote_url'] && typeof attachments['remote_url'] == "string" ? attachments['remote_url'] : attachments['url'],
|
||||||
|
preview_url: loadImages ? attachments['preview_url'] : ''
|
||||||
|
}
|
||||||
|
item['attachments'].push(tmp)
|
||||||
|
}
|
||||||
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue