Add avatar.
This commit is contained in:
parent
2d0411e59c
commit
2ab93b2bdc
|
@ -70,9 +70,17 @@ function author_html(status)
|
||||||
{
|
{
|
||||||
const p = document.createElement("p");
|
const p = document.createElement("p");
|
||||||
p.setAttribute("class", "mastodon-api-comment-author");
|
p.setAttribute("class", "mastodon-api-comment-author");
|
||||||
|
|
||||||
|
const img = document.createElement("img");
|
||||||
|
img.setAttribute("class", "mastodon-api-comment-avatar");
|
||||||
|
img.setAttribute("src", status.account.avatar);
|
||||||
|
p.appendChild(img);
|
||||||
|
p.innerHTML += " ";
|
||||||
|
|
||||||
const strong = document.createElement("strong");
|
const strong = document.createElement("strong");
|
||||||
strong.appendChild(document.createTextNode(status.account.display_name));
|
strong.appendChild(document.createTextNode(status.account.display_name));
|
||||||
p.appendChild(strong);
|
p.appendChild(strong);
|
||||||
|
|
||||||
p.appendChild(
|
p.appendChild(
|
||||||
document.createTextNode(" (" + status.account.acct + ") wrote on "
|
document.createTextNode(" (" + status.account.acct + ") wrote on "
|
||||||
+ get_status_time(status) + ":"));
|
+ get_status_time(status) + ":"));
|
||||||
|
|
Loading…
Reference in New Issue