diff --git a/index.js b/index.js index 12c3b62..d930662 100644 --- a/index.js +++ b/index.js @@ -18,7 +18,7 @@ var lanyardData = undefined var discData = null const activityImages = { - "ULTRAKILL": "https://thumbor-production-0e82.up.railway.app/unsafe/512x512/https://fs.violets-purgatory.dev/ULTRAKILL/etc/DiscordIcon.webp" + "ULTRAKILL": "https://fs.violets-purgatory.dev/ULTRAKILL/etc/DiscordIcon.webp" } var mastoData = { @@ -72,7 +72,11 @@ function pageUpdate() { var status = lanyardData.activities[0] addedHTML += "
"
if (status.emoji) {
- addedHTML += ` `
+ if (status.emoji.id) {
+ addedHTML += ` `
+ } else {
+ addedHTML += status.emoji.name
+ }
}
if (status.state) {
addedHTML += `"`
@@ -87,19 +91,6 @@ function pageUpdate() {
addedHTML = ""
- if (lanyardData) {
- for (let index = 0; index < lanyardData.activities.length; index++) {
- const activity = lanyardData.activities[index];
- if (activity.type == 4) {
- addedHTML += ` "${lanyardData.activities[0].state}" - ${lanyardData.discord_user.display_name} ${new Date(Date.now()).getFullYear()}
Listening to ${activity.name}
Playing ${activity.name}
Developer 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. Developer Offline Just some fun things that really don't have use on the main page but exist anyway!
Song: ${activity.details || " "}
@@ -187,7 +179,7 @@ function pageUpdate() {
addedHTML += `
${activity.details || activity.assets.large_text || " "}
diff --git a/resources/mainPage.html b/resources/mainPage.html
index aa2e63f..1306c41 100644
--- a/resources/mainPage.html
+++ b/resources/mainPage.html
@@ -25,7 +25,7 @@
Violet
-
+
+
diff --git a/static/extras/discord/index.html b/static/extras/discord/index.html
new file mode 100644
index 0000000..6a38921
--- /dev/null
+++ b/static/extras/discord/index.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Discord Status (W.I.P)
+ Violet
+
"
+
+ if (activity.type == 4) {
+ 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)
+ }
+ }
+ }
+ }
+})
\ No newline at end of file
diff --git a/static/extras/index.html b/static/extras/index.html
new file mode 100644
index 0000000..9c5aefb
--- /dev/null
+++ b/static/extras/index.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Extras