const characters = document.getElementById("characters"); const CURRENT_CHARACTER = "meowcatheorange/iszac"; fetch_ask(`https://beta.trollcall.xyz/api/troll/${CURRENT_CHARACTER}`) .then((x) => x.json()) .then((char) => { var name = char.name .map((string) => { string = string[0].toUpperCase() + string.slice(1); return string; }) .join(" "); characters.querySelector( ".characterName" ).innerHTML = `${name}`; characters.querySelector(".characterImage").src = char.images[0]; characters.querySelector(".pronouns").innerHTML = char.pronouns .map((pronoun) => pronoun[0]) .join("/"); characters.style.display = null; });