bug fixes

This commit is contained in:
CatAClock 2025-05-23 19:42:50 -07:00
parent c022194589
commit 8a5b55f999
2 changed files with 5 additions and 5 deletions

View file

@ -212,7 +212,7 @@ async function ApplyMedia(Media, Element, Author = undefined) {
} else {
Element.innerHTML += "<img src=" + Media.remote_url + " alt='" + EscapeRegExp(Media.description) + "'/>";
}
} else if (Media.type == "video") {
} else if (Media.type == "video" || Media.type == "gifv") {
if (Media.remote_url == null) {
Element.innerHTML += "<video controls src=" + Media.url + " alt='" + EscapeRegExp(Media.description) + "'></video>";
} else {
@ -229,7 +229,7 @@ async function ApplyMedia(Media, Element, Author = undefined) {
Element.innerHTML += "<p class='Embed'>" + Text + "</p><br/>";
// To stop confusion: this is for the RECORD EMBED! It gets an image from the record embed and puts it there.
if (Texty.posts[0].record.embed.$type == "app.bsky.embed.images" || Texty.posts[0].record.embed.$type == "app.bsky.embed.video") {
await BlueskyBlobEmbed(Texty.posts[0].record.embed, Element, Author);
await BlueskyBlobEmbed(Texty.posts[0].record.embed, Element, Texty.posts[0].author.did);
}
// Just a record on it's own.
} else if (Media.$type == "app.bsky.embed.record") {
@ -238,7 +238,7 @@ async function ApplyMedia(Media, Element, Author = undefined) {
Text = Text.replace(/\r?\n|\r/g, "<br/>");
Element.innerHTML += "<p class='Embed'>" + Text + "</p><br/>";
if (Texty.posts[0].record.embed.$type == "app.bsky.embed.images" || Texty.posts[0].record.embed.$type == "app.bsky.embed.video") {
await BlueskyBlobEmbed(Texty.posts[0].record.embed, Element, Author);
await BlueskyBlobEmbed(Texty.posts[0].record.embed, Element, Texty.posts[0].author.did);
}
// Image on it's own
} else if (Media.$type == "app.bsky.embed.images" || Media.$type == "app.bsky.embed.video") {

View file

@ -226,7 +226,7 @@ async function PosterContainerUpdate(Direction) {
if (MastodonLoadedFeed[CurrentThing + counter].reblog.media_attachments.length != 0) {
if (MastodonLoadedFeed[CurrentThing + counter].reblog.media_attachments[0].type == "image") {
i.getElementsByClassName("PostContent")[0].innerHTML += "This post has an image!<br/>";
} else if (MastodonLoadedFeed[CurrentThing + counter].reblog.media_attachments[0].type == "video") {
} else if (MastodonLoadedFeed[CurrentThing + counter].reblog.media_attachments[0].type == "video" || MastodonLoadedFeed[CurrentThing + counter].media_attachments[0].type == "gifv") {
i.getElementsByClassName("PostContent")[0].innerHTML += "This post has a video!<br/>";
}
}
@ -234,7 +234,7 @@ async function PosterContainerUpdate(Direction) {
if (MastodonLoadedFeed[CurrentThing + counter].media_attachments.length != 0) {
if (MastodonLoadedFeed[CurrentThing + counter].media_attachments[0].type == "image") {
i.getElementsByClassName("PostContent")[0].innerHTML += "This post has an image!<br/>";
} else if (MastodonLoadedFeed[CurrentThing + counter].media_attachments[0].type == "video") {
} else if (MastodonLoadedFeed[CurrentThing + counter].media_attachments[0].type == "video" || MastodonLoadedFeed[CurrentThing + counter].media_attachments[0].type == "gifv") {
i.getElementsByClassName("PostContent")[0].innerHTML += "This post has a video!<br/>";
}
}