diff --git a/src/HTTP/JS/BlueskyAPI.js b/src/HTTP/JS/BlueskyAPI.js
index bf7048b..5dd50e5 100644
--- a/src/HTTP/JS/BlueskyAPI.js
+++ b/src/HTTP/JS/BlueskyAPI.js
@@ -343,6 +343,8 @@ export function ApplyFacets(record, text) {
let Hrefs = [];
let TempText = "";
if (record.hasOwnProperty("facets")) {
+ // First minute append.
+ SplitAreas.push(text.length);
// First, append split areas.
for (let i of record.facets) {
if (i.features[0].$type == "app.bsky.richtext.facet#link") {
diff --git a/src/HTTP/JS/index.js b/src/HTTP/JS/index.js
index e362dff..6a5c411 100644
--- a/src/HTTP/JS/index.js
+++ b/src/HTTP/JS/index.js
@@ -228,7 +228,7 @@ async function PosterContainerUpdate(Direction) {
}
MastodonLoadedFeed = await MastodonLoadedFeed.concat(TempFeed);
}
- // put the reblog into the regular post; Make changes as necessary.
+ // Put the reblog into the regular post; Make changes as necessary.
if (MastodonLoadedFeed[CurrentThing + counter].reblog != null && typeof MastodonLoadedFeed[CurrentThing + counter].reblog != "string") {
// Fix a reblog issue.
let ReblogFix = MastodonLoadedFeed[CurrentThing + counter].account.acct;
@@ -239,7 +239,7 @@ async function PosterContainerUpdate(Direction) {
// this function is if the changes are already made.
i.getElementsByClassName("Username")[0].innerHTML = " ( R: " + MastodonLoadedFeed[CurrentThing + counter].reblog + " )";
}
- i.getElementsByClassName("Username")[0].innerHTML = MastodonLoadedFeed[CurrentThing + counter].account.acct + i.getElementsByClassName("Username")[0].innerHTML
+ i.getElementsByClassName("Username")[0].innerHTML = MastodonLoadedFeed[CurrentThing + counter].account.acct;
// Check for images.
if (MastodonLoadedFeed[CurrentThing + counter].media_attachments.length != 0) {
if (MastodonLoadedFeed[CurrentThing + counter].media_attachments[0].type == "image") {
@@ -255,7 +255,6 @@ async function PosterContainerUpdate(Direction) {
// Content warning. Don't show the content unless clicked!!!
if (MastodonLoadedFeed[CurrentThing + counter].spoiler_text != "") {
i.getElementsByClassName("PostContent")[0].innerHTML += "WARNING: " + MastodonLoadedFeed[CurrentThing + counter].spoiler_text + "";
- i.getElementsByClassName("Username")[0].innerHTML = MastodonLoadedFeed[CurrentThing + counter].account.username;
break;
}
i.getElementsByClassName("PostContent")[0].innerHTML += MastodonLoadedFeed[CurrentThing + counter].content;
@@ -274,6 +273,12 @@ async function PosterContainerUpdate(Direction) {
}
BlueskyLoadedFeed = await BlueskyLoadedFeed.concat(TempFeed);
}
+ // Check for a reblog.
+ if (BlueskyLoadedFeed[CurrentThing + counter].hasOwnProperty("reason") && BlueskyLoadedFeed[CurrentThing + counter].reason.$type == "app.bsky.feed.defs#reasonRepost") {
+ i.getElementsByClassName("Username")[0].innerHTML = BlueskyLoadedFeed[CurrentThing + counter].post.author.handle + " ( R: " + BlueskyLoadedFeed[CurrentThing + counter].reason.by.handle + " )";
+ } else {
+ i.getElementsByClassName("Username")[0].innerHTML = BlueskyLoadedFeed[CurrentThing + counter].post.author.handle;
+ }
// check for "already seen" posts, then put it as a seen post.
BlueskyLoadedFeed = CheckForDups(BlueskyLoadedFeed, BlueskyPostsDup, counter);
BlueskyPostsDup.push(BlueskyLoadedFeed[counter].post.uri);
@@ -296,19 +301,12 @@ async function PosterContainerUpdate(Direction) {
// Labels
if (BlueskyLoadedFeed[CurrentThing + counter].post.labels.length != 0) {
i.getElementsByClassName("PostContent")[0].innerHTML += "LABELS APPLIED: ";
- i.getElementsByClassName("Username")[0].innerHTML = BlueskyLoadedFeed[CurrentThing + counter].post.author.handle;
for (let lab of BlueskyLoadedFeed[CurrentThing + counter].post.labels) {
i.getElementsByClassName("PostContent")[0].innerHTML += lab.val + " ";
}
i.getElementsByClassName("PostContent")[0].innerHTML += "";
break;
}
- // Check for a reblog.
- if (BlueskyLoadedFeed[CurrentThing + counter].hasOwnProperty("reason") && BlueskyLoadedFeed[CurrentThing + counter].reason.$type == "app.bsky.feed.defs#reasonRepost") {
- i.getElementsByClassName("Username")[0].innerHTML = BlueskyLoadedFeed[CurrentThing + counter].post.author.handle + " ( R: " + BlueskyLoadedFeed[CurrentThing + counter].reason.by.handle + " )";
- } else {
- i.getElementsByClassName("Username")[0].innerHTML = BlueskyLoadedFeed[CurrentThing + counter].post.author.handle;
- }
// Apply correct facets.
let TempText = await BlueskyAPI.ApplyFacets(BlueskyLoadedFeed[CurrentThing + counter].post.record, BlueskyLoadedFeed[CurrentThing + counter].post.record.text);
TempText = TempText.replace(/\r?\n|\r/g, "
");