Skip to content

Commit

Permalink
enigma bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GDjkhp committed Dec 18, 2023
1 parent 8483a3a commit 6875481
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h2> My Personal Information </h2>
<div style="border: 3px white solid; border-radius: .75rem;">
<div class="c" id="e" style="display: none; border-radius: .50rem .50rem 0px 0px;">
<div style="position: relative; height: 64px;">
<img id="avatar" width="64" style="border-radius: 9999px;" src="https://gdjkhp.github.io/img/unknown.png">
<img id="avatar" width="64" style="border-radius: 9999px;" src="https://gdjkhp.github.io/img/dc.png">
<span id="online" style="width: 16px; height: 16px; border-radius: 9999px; position: absolute; bottom: 0px; right: 0px; background-color: gray; border: black 2px solid;">
</div>
<div style="padding: 8px;">
Expand Down
4 changes: 1 addition & 3 deletions scripts/rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ function timer(element, timestamp) {
}
}

async function init() {}

async function updatepresence() {
var json = await lanyard({userId: userid});
var avatar = document.getElementById("avatar");
Expand All @@ -43,7 +41,7 @@ async function updatepresence() {
var d = document.getElementById("d");
var e = document.getElementById("e");
e.style.display = "flex";
avatar.src = "https://cdn.discordapp.com/avatars/" + userid + "/" + json.discord_user.avatar;
avatar.src = json.discord_user.avatar ? "https://cdn.discordapp.com/avatars/" + userid + "/" + json.discord_user.avatar : "https://gdjkhp.github.io/img/dc.png";
username.innerHTML = json.discord_user.username;
online.style.backgroundColor = getStatusColor(json.discord_status);
activities = json.activities;
Expand Down

0 comments on commit 6875481

Please sign in to comment.