Skip to content

Commit

Permalink
feat(Stake.us): display balance for Originals and currency in play
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin-Kwan committed Apr 20, 2024
1 parent bcdfec5 commit 045449d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion websites/S/Stake.us/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
"value": true
}
]
}
}
8 changes: 6 additions & 2 deletions websites/S/Stake.us/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ presence.on("UpdateData", async () => {
else currency = "Gold Coins";
}

if (pathname.includes("games"))
presenceData.details = "Balance: (In Use In Game)";
if (
pathname.includes("games") &&
document.querySelector("div.title-wrap > a").textContent.trim() !==
"Stake Originals"
)
presenceData.details = `Balance: (In Play) ${currency}`;
else if (!pathname.includes("games") && balance.includes(","))
presenceData.details = `Balance: ${balance} (${currency})`;
else presenceData.details = `Balance: ${balance} ${currency}`;
Expand Down

0 comments on commit 045449d

Please sign in to comment.