make pfp fetched from lanyard
Some checks failed
Deploy static content to Pages / deploy (push) Failing after 4s

This commit is contained in:
zyqunix 2025-06-26 15:12:39 +02:00
parent 3e0eb52eaf
commit b18bd5c94e
No known key found for this signature in database
GPG key ID: 134A8DEEA83B80E6
2 changed files with 5 additions and 4 deletions

View file

@ -45,9 +45,10 @@ setInterval(() => {
ageElem.setAttribute("data-tooltip", updateAge(null, 10, "years old"));
}, 10);
const user = "1201415921802170388";
function lan() {
lanyard({userId: "1201415921802170388"}).then(data => {
lanyard({userId: user}).then(data => {
const statusElem = document.getElementById('status');
const pfpElem = document.getElementById('profile-picture');
const activity = document.querySelector('.activity');
@ -63,6 +64,8 @@ function lan() {
offline: "#80848e"
};
pfpElem.src = `https://cdn.discordapp.com/avatars/${user}/${data.discord_user.avatar}.webp`
const borderColor = statusColors[data.discord_status] || statusColors.offline;
pfpElem.style.borderColor = borderColor;
@ -107,8 +110,6 @@ function lan() {
}
} else
activity.style.display = "none";
});
}

View file

@ -12,7 +12,7 @@
</head>
<body>
<div class="info" id="Info">
<img src="https://cdn.discordapp.com/avatars/1201415921802170388/3ccc13a2825eb8c98b5371fa0706e450.webp?size=1024&amp;width=640&amp;height=640" alt="Profile Picture" id="profile-picture"/>
<img alt="Profile Picture" id="profile-picture"/>
<h1 class="name tooltip" data-tooltip="zyqunix / Fabio / fentboiswag / монгол">zyqunix</h1>
<span><div class="time tooltip" id="time"></div><div class="weather" id="weather"></div></span></span>
<div class="age tooltip" id="age"></div>