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

15 lines
591 B
JavaScript

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;
});