This commit is contained in:
CatAClock 2025-06-12 21:34:08 -07:00
parent 2401f9b958
commit a0bd84d844

View file

@ -30,11 +30,15 @@ Favorite.onclick = (event) => {
if (Favoritable == false) {
return;
}
Favoritee();
}
async function Favoritee() {
Favoritable = false;
if (website == "Mastodon") {
MastodonAPI.CreateFavorite(post.id, post.favourited);
await MastodonAPI.CreateFavorite(post.id, post.favourited);
} else if (website == "Bluesky") {
BlueskyAPI.CreateLike(localStorage.getItem(Variables.BlueskyDID), post.post.uri, post.post.cid);
await BlueskyAPI.CreateLike(localStorage.getItem(Variables.BlueskyDID), post.post.uri, post.post.cid);
}
SetFavorite();
}
@ -43,11 +47,15 @@ Boost.onclick = (event) => {
if (Boostable == false) {
return;
}
Boostee();
}
async function Boostee() {
Boostable = false;
if (website == "Mastodon") {
MastodonAPI.CreateReblog(post.id, post.reblogged);
await MastodonAPI.CreateReblog(post.id, post.reblogged);
} else if (website == "Bluesky") {
BlueskyAPI.CreateRepost(localStorage.getItem(Variables.BlueskyDID), post.post.uri, post.post.cid);
await BlueskyAPI.CreateRepost(localStorage.getItem(Variables.BlueskyDID), post.post.uri, post.post.cid);
}
SetBoost();
}