From 8a5b55f9999e1383a353ba4ac13c9be4fe836263 Mon Sep 17 00:00:00 2001 From: CatAClock Date: Fri, 23 May 2025 19:42:50 -0700 Subject: [PATCH] bug fixes --- JS/expanded.js | 6 +++--- JS/index.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/JS/expanded.js b/JS/expanded.js index 3ad8bb8..4b36834 100644 --- a/JS/expanded.js +++ b/JS/expanded.js @@ -212,7 +212,7 @@ async function ApplyMedia(Media, Element, Author = undefined) { } else { Element.innerHTML += "" + EscapeRegExp(Media.description) + ""; } - } else if (Media.type == "video") { + } else if (Media.type == "video" || Media.type == "gifv") { if (Media.remote_url == null) { Element.innerHTML += ""; } else { @@ -229,7 +229,7 @@ async function ApplyMedia(Media, Element, Author = undefined) { Element.innerHTML += "

" + Text + "


"; // 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, "
"); Element.innerHTML += "

" + Text + "


"; 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") { diff --git a/JS/index.js b/JS/index.js index f9d7ee4..ae14296 100644 --- a/JS/index.js +++ b/JS/index.js @@ -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!
"; - } 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!
"; } } @@ -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!
"; - } 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!
"; } }