mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-23 07:32:57 -06:00
redesign profile template
This commit is contained in:
parent
2a44a49979
commit
c200c79bcd
3 changed files with 280 additions and 261 deletions
|
|
@ -60,3 +60,20 @@ Array.from(document.getElementsByClassName("spoiler-label")).forEach((label) =>
|
|||
label.addEventListener("click", () => { setTimeout(update, 1); });
|
||||
}
|
||||
});
|
||||
|
||||
Array.from(document.getElementsByClassName("spoiler-details")).forEach((spoiler) => {
|
||||
const button = spoiler.getElementsByClassName("button")[0];
|
||||
|
||||
if (button != undefined) {
|
||||
function update() {
|
||||
if (spoiler.open) {
|
||||
button.textContent = "Show less";
|
||||
} else {
|
||||
button.textContent = "Show more";
|
||||
}
|
||||
}
|
||||
update();
|
||||
|
||||
spoiler.addEventListener("toggle", update);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue