bug fix
This commit is contained in:
parent
cff163f6d0
commit
ed3519f6c4
1 changed files with 14 additions and 19 deletions
|
@ -55,27 +55,17 @@ for (let i of document.getElementsByClassName("Regular")) {
|
||||||
// Selecting other posts.
|
// Selecting other posts.
|
||||||
for (let i of document.getElementsByClassName("Parent")) {
|
for (let i of document.getElementsByClassName("Parent")) {
|
||||||
i.onclick = (event) => {
|
i.onclick = (event) => {
|
||||||
SetThreadPost(Parentpost);
|
SetThreadPost(Parentpost, i);
|
||||||
if (i.classList.contains("Handle")) {
|
|
||||||
window.location.href = "../../HTML/account.html?website=" + website;
|
|
||||||
} else {
|
|
||||||
document.location.href = "./expanded.html?website=" + website;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i of document.getElementsByClassName("GrandParent")) {
|
for (let i of document.getElementsByClassName("GrandParent")) {
|
||||||
i.onclick = (event) => {
|
i.onclick = (event) => {
|
||||||
SetThreadPost(GrandParentpost);
|
SetThreadPost(GrandParentpost, i);
|
||||||
if (i.classList.contains("Handle")) {
|
|
||||||
window.location.href = "../../HTML/account.html?website=" + website;
|
|
||||||
} else {
|
|
||||||
document.location.href = "./expanded.html?website=" + website;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function SetThreadPost(element) {
|
async function SetThreadPost(element, i) {
|
||||||
if (website == "Mastodon") {
|
if (website == "Mastodon") {
|
||||||
localStorage.setItem("post", JSON.stringify(element));
|
localStorage.setItem("post", JSON.stringify(element));
|
||||||
} else if (website == "Bluesky") {
|
} else if (website == "Bluesky") {
|
||||||
|
@ -83,6 +73,11 @@ async function SetThreadPost(element) {
|
||||||
element.post = Temp.posts[0];
|
element.post = Temp.posts[0];
|
||||||
localStorage.setItem("post", JSON.stringify(element));
|
localStorage.setItem("post", JSON.stringify(element));
|
||||||
}
|
}
|
||||||
|
if (i.classList.contains("Handle")) {
|
||||||
|
window.location.href = "../../HTML/account.html?website=" + website;
|
||||||
|
} else {
|
||||||
|
document.location.href = "./expanded.html?website=" + website;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Functions and things.
|
// Functions and things.
|
||||||
|
|
Loading…
Add table
Reference in a new issue