diff --git a/index.js b/index.js index 10ccfd0..b977bf1 100644 --- a/index.js +++ b/index.js @@ -77,7 +77,6 @@ function pageUpdate() { } else { addedHTML += status.emoji.name } - } if (status.state) { addedHTML += `"` diff --git a/resources/mainPage.html b/resources/mainPage.html index feb782f..fd13bcb 100644 --- a/resources/mainPage.html +++ b/resources/mainPage.html @@ -25,7 +25,7 @@

Violet

- +

They/Them

Developer

diff --git a/static/discord/index.html b/static/discord/index.html index 493dff7..fb55e50 100644 --- a/static/discord/index.html +++ b/static/discord/index.html @@ -19,7 +19,8 @@ - +
+

Discord Status

This is a more fleshed out version of the main discord status on my site, issue being, it requires Javascript. So, I choose not to use it, though it coulda been cool...

I still am tempted to add something like it to the main page, and just make it compatible without javascript, but I worry that'd upset people.

@@ -27,9 +28,8 @@

Violet

- +
-

They/Them

Developer

Offline

@@ -38,6 +38,7 @@

+
\ No newline at end of file diff --git a/static/discord/index.js b/static/discord/index.js index 8244504..7053ede 100644 --- a/static/discord/index.js +++ b/static/discord/index.js @@ -50,10 +50,23 @@ lanyard.addEventListener("message", (res) => { $(".pfp").css("border-color", statusData.color) if (lanyardData) { + $("#discQuote").html("") for (let index = 0; index < lanyardData.activities.length; index++) { const activity = lanyardData.activities[index]; + var status = lanyardData.activities[0] + var addedHTML = "" + addedHTML += "
" + if (activity.type == 4) { - $("#discQuote").html(`
"${lanyardData.activities[0].state}" - ${lanyardData.discord_user.display_name} ${new Date(Date.now()).getFullYear()}`) + if (status.emoji) { + if (status.emoji.id) { + addedHTML += ` ` + } else { + addedHTML += status.emoji.name + } + } + addedHTML += `"${lanyardData.activities[0].state}" - ${lanyardData.discord_user.display_name} ${new Date(Date.now()).getFullYear()}` + $("#discQuote").html(addedHTML) } } }