mirror of
https://github.com/zyqunix/tools.git
synced 2025-07-05 22:10:31 +02:00
make pfp fetched from lanyard
Some checks failed
Deploy static content to Pages / deploy (push) Failing after 4s
Some checks failed
Deploy static content to Pages / deploy (push) Failing after 4s
This commit is contained in:
parent
3e0eb52eaf
commit
b18bd5c94e
2 changed files with 5 additions and 4 deletions
|
@ -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";
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue