From b7a98508b287238ec31a461f18caca343a7f1724 Mon Sep 17 00:00:00 2001 From: MeowcaTheoRange Date: Fri, 29 Dec 2023 01:18:20 -0600 Subject: [PATCH] sure why not --- views/index.html | 4 +++- views/scripts/data_get_whoami.js | 31 +++++++++++++++++++++++++------ views/styles/normal.css | 7 +++++++ 3 files changed, 35 insertions(+), 7 deletions(-) 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 = `

Bio

MeowcaTheoRange
${user.bio + .replace(URL_REGEXP, (m) => `${m}`) + .replaceAll("\n", "
")}

`; const curTime = new Date(); timezone.innerHTML = `(UTC${user.utc_offset > 0 ? "+" : "-"}${Math.abs( user.utc_offset / (60 * 60) @@ -34,11 +43,14 @@ fetch("https://pronouns.cc/api/v1/users/MeowcaTheoRange") }; buttonflags.disabled = false; function updateTime() { - curTime.setTime( - Date.now() - ); - time.innerHTML = curTime.toLocaleTimeString("en-us", { timeZone: "America/Chicago" }); - weekday.innerHTML = curTime.toLocaleString("en-us", { weekday: "long", timeZone: "America/Chicago" }); + curTime.setTime(Date.now()); + time.innerHTML = curTime.toLocaleTimeString("en-us", { + timeZone: "America/Chicago", + }); + weekday.innerHTML = curTime.toLocaleString("en-us", { + weekday: "long", + timeZone: "America/Chicago", + }); window.requestAnimationFrame(updateTime); } @@ -56,3 +68,10 @@ fetch("https://pronouns.cc/api/v1/users/MeowcaTheoRange") ) .join(""); }); + +fetch("https://local.abtmtr.link/api/v1/accounts/stat/statuses") + .then((x) => x.json()) + .then((statuses) => { + console.log(statuses); + statusus.innerHTML = `

Current status

${statuses[0].content}

`; + }); diff --git a/views/styles/normal.css b/views/styles/normal.css index 733f11e..3270339 100755 --- a/views/styles/normal.css +++ b/views/styles/normal.css @@ -286,6 +286,13 @@ blockquote { margin-block: 0.5em; } +/* Pseudo normalize */ + +::selection { + color: var(--background-color); + background-color: var(--color); +} + /* Form normalize */ html {