Update index.js
This commit is contained in:
parent
effbcc34da
commit
1f746c3a6f
1 changed files with 0 additions and 15 deletions
15
index.js
15
index.js
|
@ -56,21 +56,6 @@ function pageUpdate() {
|
||||||
|
|
||||||
addedHTML = ""
|
addedHTML = ""
|
||||||
|
|
||||||
var currentTime = new Date(Date.now())
|
|
||||||
var currentHour = currentTime.getHours()
|
|
||||||
|
|
||||||
if (currentHour >= 8 && currentHour <= 16 && !(currentTime.getDay() == 6 || currentTime.getDay() == 7)) {
|
|
||||||
addedHTML = `<span style="color: yellow">busy</span>`
|
|
||||||
} else if (currentHour <= 9 && currentHour > 0) {
|
|
||||||
addedHTML = `<span style="color: rgb(200, 150, 255)">eeping</span>`
|
|
||||||
} else {
|
|
||||||
addedHTML = `<span style="color: limegreen">active?</span>`
|
|
||||||
}
|
|
||||||
|
|
||||||
html = html.replace("{ACTIVE_STATUS}", addedHTML)
|
|
||||||
|
|
||||||
addedHTML = ""
|
|
||||||
|
|
||||||
if (lanyardData && lanyardData.activities.length > 0) {
|
if (lanyardData && lanyardData.activities.length > 0) {
|
||||||
if (lanyardData.activities[0].type == 4) {
|
if (lanyardData.activities[0].type == 4) {
|
||||||
addedHTML += `<hr><p><em><span style="color: lightgray">"${lanyardData.activities[0].state}"</span> - ${lanyardData.discord_user.display_name} ${new Date(Date.now()).getFullYear()}</em></p>`
|
addedHTML += `<hr><p><em><span style="color: lightgray">"${lanyardData.activities[0].state}"</span> - ${lanyardData.discord_user.display_name} ${new Date(Date.now()).getFullYear()}</em></p>`
|
||||||
|
|
Loading…
Reference in a new issue