web-services/steamdb: Add getting stats
This commit is contained in:
parent
551d013b60
commit
cd364c00e6
|
@ -33,3 +33,10 @@
|
||||||
|
|
||||||
:::js
|
:::js
|
||||||
Array.from(document.querySelectorAll('#tracklist tr:not(:nth-child(1))')).map(el => el.querySelector('span[id^="title-"]').innerText + " " + el.querySelector('td:nth-child(3)').innerText).join("\n")
|
Array.from(document.querySelectorAll('#tracklist tr:not(:nth-child(1))')).map(el => el.querySelector('span[id^="title-"]').innerText + " " + el.querySelector('td:nth-child(3)').innerText).join("\n")
|
||||||
|
|
||||||
|
## SteamDB
|
||||||
|
|
||||||
|
### Get stats as json
|
||||||
|
|
||||||
|
:::js
|
||||||
|
console.log(JSON.stringify(Array.from(document.querySelectorAll('#js-achievements table tbody tr')).map(row => { const cols = row.querySelectorAll('td'); return { name: cols[0].innerText, description: cols[1].querySelector('p.i').innerText, displayName: cols[1].childNodes[0].textContent.replace(/\n/g, ''), hidden: "0", icon: "achievements/" + cols[0].innerText + ".jpg", icongray: "achievements/" + cols[0].innerText + "_gray.jpg" } })))
|
||||||
|
|
Loading…
Reference in a new issue