mirror of
https://github.com/zyqunix/tools.git
synced 2025-07-05 14:00: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";
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<div class="info" id="Info">
|
||||
<img src="https://cdn.discordapp.com/avatars/1201415921802170388/3ccc13a2825eb8c98b5371fa0706e450.webp?size=1024&width=640&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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue