Emoji!
This commit is contained in:
parent
5edbad9270
commit
7e4fddf5d9
2 changed files with 14 additions and 1 deletions
9
index.js
9
index.js
|
@ -69,7 +69,14 @@ function pageUpdate() {
|
||||||
|
|
||||||
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>`
|
var status = lanyardData.activities[0]
|
||||||
|
addedHTML += "<hr><p>"
|
||||||
|
if (status.emoji) {
|
||||||
|
addedHTML += `<img class="emoji" src="https://cdn.discordapp.com/emojis/${lanyardData.activities[0].emoji.id}.webp?size=32&quality=lossless"/>`
|
||||||
|
}
|
||||||
|
addedHTML += `<em><span style="color: lightgray">"`
|
||||||
|
addedHTML += (lanyardData.activities[0].state || "")
|
||||||
|
addedHTML += `"</span> - ${lanyardData.discord_user.display_name} ${new Date(Date.now()).getFullYear()}</em></p>`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,12 @@ img {
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.emoji {
|
||||||
|
width: 32px;
|
||||||
|
border-radius: 10%;
|
||||||
|
border: 1px gray solid;
|
||||||
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
color: white;
|
color: white;
|
||||||
opacity: 0.25;
|
opacity: 0.25;
|
||||||
|
|
Loading…
Reference in a new issue