Skip to content

Commit

Permalink
fix: update presence
Browse files Browse the repository at this point in the history
  • Loading branch information
Synxx12 committed Oct 13, 2024
1 parent 057dd97 commit 096fd40
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions websites/W/Weverse/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class Weverse extends Presence {
node.matches("[class*=LiveBadgeView_badge]")
)
);

return (
titleTextNodes
.map(node => node.textContent)
Expand Down Expand Up @@ -115,13 +114,8 @@ presence.on("UpdateData", async () => {
},
];
} else if (video) {
if (video.paused) {
presenceData.smallImageKey = Assets.Pause;
presenceData.smallImageText = "Paused";
} else {
presenceData.smallImageKey = Assets.Live;
presenceData.smallImageText = "Live";
}
presenceData.smallImageKey = video.paused ? Assets.Pause : Assets.Live;
presenceData.smallImageText = video.paused ? "Paused" : "Live";
presenceData.buttons = [
{
label: `Visit ${presence.getArtistName()} Live`,
Expand Down Expand Up @@ -158,7 +152,6 @@ presence.on("UpdateData", async () => {
} else if (document.location.pathname.includes("/artist")) {
presenceData.details = "Viewing Artist";
presenceData.state = presence.getArtistPageName();

presenceData.buttons = [
{
label: `Visit ${presence.getArtistPageName()} Artist`,
Expand All @@ -181,7 +174,6 @@ presence.on("UpdateData", async () => {
} else if (document.location.pathname.includes("/media")) {
presenceData.details = "Viewing Media";
presenceData.state = presence.getCommunityName();

presenceData.buttons = [
{
label: `Visit ${presence.getCommunityName()} Media`,
Expand All @@ -202,7 +194,6 @@ presence.on("UpdateData", async () => {
url: document.location.href,
},
];

}

presence.setActivity(presenceData);
Expand Down

0 comments on commit 096fd40

Please sign in to comment.