Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
nubesurrealista authored Dec 19, 2024
1 parent 478f7e5 commit 706e4eb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,17 @@ <h1>Mis Toots <img id="mastodon-icon" src="https://upload.wikimedia.org/wikipedi
}
const toots = await tootsResponse.json();

const reblogsResponse = await fetch(`${instanceURL}/api/v1/accounts/${userId}/statuses?only_media=false&exclude_replies=false&exclude_reblogs=false&limit=20`);
if (!reblogsResponse.ok) {
throw new Error(`Error al cargar los reblogs: ${reblogsResponse.status} ${reblogsResponse.statusText}`);
}
const reblogs = await reblogsResponse.json();

const allToots = [...toots, ...reblogs];

contentDiv.innerHTML = '';
if (toots.length > 0) {
toots.forEach(toot => {
if (allToots.length > 0) {
allToots.forEach(toot => {
let content = sanitizeHTML(toot.content);
const createdAt = new Date(toot.created_at).toLocaleString();
const url = toot.url;
Expand Down

0 comments on commit 706e4eb

Please sign in to comment.