From 3a7f4238ad0183ec6a5f873c6ec33b7bf272c70b Mon Sep 17 00:00:00 2001 From: Clove Twilight Date: Thu, 18 Jun 2026 15:59:37 +0100 Subject: [PATCH] Updates --- css/main.css | 12 ++++++++++++ dev-info/index.html | 2 +- js/friends.js | 13 +++++++++++++ js/now-playing.js | 4 +++- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/css/main.css b/css/main.css index ea2ff49..791a82c 100644 --- a/css/main.css +++ b/css/main.css @@ -2045,6 +2045,18 @@ body:has(.friends-wrap) .hub { display: block; } +/* avatar decoration / frame overlay (Discord cosmetic) */ +.fc-deco { + position: absolute; + top: 50%; + left: 50%; + width: 76px; + height: 76px; + transform: translate(-50%, -50%); + pointer-events: none; +} +.fc-deco[hidden] { display: none; } + /* status dot — colour driven by data-status on the card */ .fc-status { position: absolute; diff --git a/dev-info/index.html b/dev-info/index.html index 648d707..c220722 100644 --- a/dev-info/index.html +++ b/dev-info/index.html @@ -216,7 +216,7 @@
AMD Purist
-
Team Red top to bottom — Ryzen on the CPU, Radeon on the GPU. No green in this rig.
+
Team Red top to bottom — Ryzen on the CPU, Radeon on the GPU. No green or blue in this rig.
Arch btw
diff --git a/js/friends.js b/js/friends.js index be49e9c..182e6f4 100644 --- a/js/friends.js +++ b/js/friends.js @@ -169,6 +169,7 @@ '
' + '' + '' + esc(m.name) + '' + + '' + '' + '' + '' + @@ -185,6 +186,7 @@ return { el: card, pfp: card.querySelector(".fc-pfp"), + deco: card.querySelector(".fc-deco"), statusDot: card.querySelector(".fc-status"), user: card.querySelector(".fc-user"), custom: card.querySelector(".fc-custom"), @@ -216,6 +218,17 @@ refs.el.dataset.status = status; refs.statusDot.title = STATUS_TITLE[status] || "Offline"; if (u.avatar) refs.pfp.src = avatarUrl(u); + // avatar decoration (animated APNG) — loaded straight from Discord's + // CDN; the wsrv webp proxy fails on these and would drop the animation. + var deco = u.avatar_decoration_data; + if (refs.deco) { + if (deco && deco.asset) { + refs.deco.src = "https://cdn.discordapp.com/avatar-decoration-presets/" + deco.asset + ".png"; + refs.deco.hidden = false; + } else { + refs.deco.hidden = true; + } + } if (u.username) refs.user.textContent = "@" + u.username; renderCustomStatus(refs, d.activities); renderClanTag(refs, u.primary_guild); diff --git a/js/now-playing.js b/js/now-playing.js index d4aee4e..75536cd 100644 --- a/js/now-playing.js +++ b/js/now-playing.js @@ -515,7 +515,9 @@ avImg.src = avatarUrl(u); const deco = u.avatar_decoration_data; if (deco && deco.asset) { - avDeco.src = proxyImg(`https://cdn.discordapp.com/avatar-decoration-presets/${deco.asset}.png?size=160`); + // Load decorations straight from Discord's CDN: they're animated APNGs, + // and the wsrv webp proxy fails on them (and would drop the animation). + avDeco.src = `https://cdn.discordapp.com/avatar-decoration-presets/${deco.asset}.png`; avDeco.hidden = false; } else { avDeco.hidden = true;