abtmtr-v4/views/branding/scripts/data_get_member.js

16 lines
591 B
JavaScript
Raw Normal View History

2023-11-26 07:37:29 +00:00
const characters = document.getElementById("characters");
fetch(
"https://pronouns.cc/api/v1/users/MeowcaTheoRange/members/CurrentCharacter"
)
.then((x) => x.json())
.then((member) => {
characters.querySelector(
".characterName"
).innerHTML = `<a href="${member.bio}" target="_blank">${member.display_name}</a>`;
characters.querySelector(".characterImage").src = member.links[0];
characters.querySelector(".pronouns").innerHTML = member.pronouns
.map((pronoun) => pronoun.pronouns.split("/")[0])
.join("/");
characters.style.display = null;
});