Created
March 4, 2017 12:57
-
-
Save lingsamuel/bb79a75eac22accda799077ec6654d21 to your computer and use it in GitHub Desktop.
A simple script used in https://store.steampowered.com/account/history/ to calculate your total cost.(Simplified Chinese)
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
[].reduce.call(document.body.querySelectorAll(".wht_total"), (acc, x) => {let yyy = x.textContent.trim().replace(/[¥\s资金总计]/g,''); console.log(yyy); return acc + parseFloat(yyy||0)}, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment