diff --git a/views/index.html b/views/index.html index c13b0ab..38c7fd7 100755 --- a/views/index.html +++ b/views/index.html @@ -48,8 +48,10 @@ >
- + + + diff --git a/views/scripts/data_get_whoami.js b/views/scripts/data_get_whoami.js index da96d82..2a188ec 100644 --- a/views/scripts/data_get_whoami.js +++ b/views/scripts/data_get_whoami.js @@ -3,8 +3,13 @@ const time = document.getElementById("time"); const weekday = document.getElementById("weekday"); const timezone = document.getElementById("timezone"); const nofetchy = document.getElementById("no-fetchy"); +const about = document.getElementById("about"); +const statusus = document.getElementById("status"); const buttonflags = document.getElementById("buttonflags"); const fields = document.getElementById("fields"); + +const URL_REGEXP = + /(([a-z0-9.-]*)(((:\/\/)([a-z0-9.-]*))((\/)([\w;,\/?:@&=+$\-_.!~*'()#]*))?)|(((mailto|tel):)([\w;,\/?:@&=+$\-_.!~*'()#]*)))/g; fetch("https://pronouns.cc/api/v1/users/MeowcaTheoRange") .then((x) => x.json()) .then((user) => { @@ -13,9 +18,13 @@ fetch("https://pronouns.cc/api/v1/users/MeowcaTheoRange") user.names[0].value }, also better known online as ${ user.name - }. (${user.pronouns.filter((pronoun) => pronoun.status == "okay") + }. (${user.pronouns + .filter((pronoun) => pronoun.status == "okay") .map((pronoun) => pronoun.pronouns.split("/")[0]) .join("/")})`; + about.innerHTML = `MeowcaTheoRange
${user.bio
+ .replace(URL_REGEXP, (m) => `${m}`)
+ .replaceAll("\n", "
")}