Last active
August 29, 2015 14:03
-
-
Save Ugrend/580bc3a0d74bded28dad to your computer and use it in GitHub Desktop.
get total spent on steam
This file contains hidden or 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
// ==UserScript== | |
// @name transactions | |
// @namespace store.steampowered.com/account | |
// @include https://store.steampowered.com/account/ | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
var elements = document.getElementsByClassName('transactionRowPrice'); | |
var total = 0 | |
for (var i = 0; i < elements.length; i++){ | |
var ammount = elements[i].innerHTML; | |
ammount = ammount.replace('$',''); | |
if (ammount == 'Free' || ammount == 'Total'){ | |
ammount = 0; | |
} | |
total += parseInt(ammount) | |
//console.log(ammount); | |
} | |
alert(total); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment