From fca7e5d7945324e896276c51f47453d95b1cc1b0 Mon Sep 17 00:00:00 2001
From: Bingus_Violet
Date: Sun, 19 Nov 2023 00:27:39 -0600
Subject: [PATCH] new status thiongy
---
index.js | 18 +++++++++++++++---
resources/mainPage.html | 1 +
static/socials/index.html | 2 +-
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/index.js b/index.js
index 0f28258..1eac7f3 100644
--- a/index.js
+++ b/index.js
@@ -22,7 +22,6 @@ app.listen(PORT, () => {
})
function pageUpdate() {
- console.log("Updating...")
var statuses = {
"online": {
"text": "Online",
@@ -57,6 +56,21 @@ function pageUpdate() {
addedHTML = ""
+ var currentTime = new Date(Date.now())
+ var currentHour = currentTime.getHours()
+
+ if (currentHour >= 8 && currentHour <= 16 && !(currentTime.getDay() == 6 || currentTime.getDay() == 7)) {
+ addedHTML = `at school`
+ } else if (currentHour <= 10 && currentHour > 0) {
+ addedHTML = `eeping`
+ } else {
+ addedHTML = `active?`
+ }
+
+ html = html.replace("{ACTIVE_STATUS}", addedHTML)
+
+ addedHTML = ""
+
if (lanyardData && lanyardData.activities.length > 0) {
if (lanyardData.activities[0].type == 4) {
addedHTML += `
"${lanyardData.activities[0].state}" - ${lanyardData.discord_user.display_name} ${new Date(Date.now()).getFullYear()}
`
@@ -173,8 +187,6 @@ function pageUpdate() {
html = html.replace("{SOCIALS}", addedHTML)
fs.writeFileSync(path.join(__dirname, 'static/index.html'), html)
-
- console.log("Updated!")
}
// Lanyard Stuffs
diff --git a/resources/mainPage.html b/resources/mainPage.html
index 683fbcf..e05d3af 100644
--- a/resources/mainPage.html
+++ b/resources/mainPage.html
@@ -40,6 +40,7 @@
Socials
Pronouns
{LANYARD_QUOTE}
+ Status: Probably {ACTIVE_STATUS}...
The world's worst developer
diff --git a/static/socials/index.html b/static/socials/index.html
index 9d27d3f..5d21694 100644
--- a/static/socials/index.html
+++ b/static/socials/index.html
@@ -35,7 +35,7 @@
Social media:
Fedi: @Bingus_Violet@tech.lgbt
+ href="https://tech.lgbt/@Bingus_Violet" rel="me">@Bingus_Violet@tech.lgbt
Youtube: Violet's Fiasco