made everything work

This commit is contained in:
nin0 2024-07-28 09:31:15 -04:00
parent 45496ace17
commit 305a81508e
3 changed files with 12 additions and 11 deletions

View file

@ -25,7 +25,7 @@ function onUpdate(data) {
let listening = false;
let content = "";
data.activities.forEach(presence => {
if(presence.application_id === "463151177836658699" && presence.assets.small_text != "Paused") { // premid
if(presence.application_id === "463151177836658699" && presence.assets.small_text !== "Paused") { // premid
listening = true;
artist = presence.state.substring(0, presence.state.indexOf(" -"));
if (artist === "") {
@ -53,7 +53,7 @@ function onUpdate(data) {
});
document.getElementById("presence").style.display = content === "" ? "none": "flex";
document.getElementById("presence-content").innerText = content;
document.getElementById("presence-icon").src = listening ? "music.ico" : "game.ico";
document.getElementById("presence-icon").src = listening ? "img/music.ico" : "img/game.ico";
}
LanyardWrapper.connectWebSocket("886685857560539176", onUpdate)
.catch(err => {