Created
September 29, 2023 02:37
-
-
Save FTAndy/ec3e547566bf73e52eada9276b2c7ba9 to your computer and use it in GitHub Desktop.
Steam total game hours caculation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const elements = Array.from(document.querySelectorAll('.gameslistitems_Hours_26nl3')) | |
const hours = s.map(d => d.innerText).filter(c => c.include('hours')).map(o => parseInt(/(?!\n)(.+) hours/.exec(o)[1].replace(',', '')) ).reduce((a, b) => a + b ,0) | |
console.log(hours) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment