Skip to content

Commit

Permalink
fix(Stake): fixed balance and currency parsing (#8134)
Browse files Browse the repository at this point in the history
* fix(Stake): fixed balance and currency parsing

Signed-off-by: RootK1d <[email protected]>

* fix(Stake): fixed balance and currency parsing

Signed-off-by: RootK1d <[email protected]>

* Updated largeImageKey

Signed-off-by: RootK1d <[email protected]>

* Yarn Formatted again

Signed-off-by: RootK1d <[email protected]>

* Update websites/S/Stake/metadata.json

Co-authored-by: Daniel Lau <[email protected]>
Signed-off-by: RootK1d <[email protected]>

---------

Signed-off-by: RootK1d <[email protected]>
Co-authored-by: Daniel Lau <[email protected]>
  • Loading branch information
Roo7K1d and theusaf authored Feb 29, 2024
1 parent f589095 commit 4235a9a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
7 changes: 5 additions & 2 deletions websites/S/Stake/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"de": "Stake.com ist die führende online Krypto-Casino und Sportwetten-Plattform."
},
"url": "stake.com",
"version": "1.0.9",
"matches": [
"*://stake.com/*"
],
"version": "1.0.10",
"logo": "https://cdn.rcd.gg/PreMiD/websites/S/Stake/assets/logo.png",
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/S/Stake/assets/thumbnail.png",
"color": "#1a2c3a",
Expand Down Expand Up @@ -40,4 +43,4 @@
"value": true
}
]
}
}
10 changes: 5 additions & 5 deletions websites/S/Stake/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ presence.on("UpdateData", async () => {

if (showBal) {
const balance = document
.querySelector("div.currency > span.content > span")
.textContent.trim(),
.querySelector("div.currency > span.content > span > span")
.textContent.trim()
.replace("&nbsp;", " "),
currency = document
.querySelector("div.currency > span.variant-subtle > svg > use")
.getAttributeNS("http://www.w3.org/1999/xlink", "href")
.replace("#icon-currency-", "")
.querySelector("div.currency > span.variant-subtle")
.getAttribute("title")
.toUpperCase();

if (pathname.includes("games")) presenceData.details = "Balance: (In Game)";
Expand Down

0 comments on commit 4235a9a

Please sign in to comment.