This is a way to find out how much you spent on in-game purchases in steam games. All you have to do is go to a certain game and select in-game purchases, It can be found somewhere in valve's confusing menu and old laggy interface that they haven't fixed in the longest time. Speaking of valve I mean come on, it's like they aren't doing anything these days... VR? yea I want a 500 dollar headset that also requires a metric tone of space. While we're at it whats up with that card game...Artifacts? what the heck, was that a sick joke or something? To be honest all I want it L4D3 but nooo have a card game you pesants!!! ok nevermind rant over... here is the link that took me there, maybe you can use it:
https://help.steampowered.com/en/wizard/HelpWithGameIssue?appid=730&issueid=107
I'm guessing the appid is the game and issueid is the in-game purchases list so that link would normally only work for CSGO.
Just go to chrome dev tools and enter this line in the console. You can read it yourself its not a virus or anything. All it does is select all elements with class help_purchase_price
and sums it all up, that's it!
Object.values(document.getElementsByClassName("help_purchase_right")) // gets all elements with class "help_purchase_price" the class that holds all the prices
.map(el => el.innerHTML.match(/(\d+.\d+)/g)[0]) // capture all the monies
.reduce((accu, el) => accu + Number(el), 0) //reduces array into 1 number
How much money did you spend? Leave a comment below with the game and the amount and also for a limited time only if you leave your social security number you will be guaranteed to win 1 free year of Equifax social security number protection and a brand new used Toyota Corolla 2012 with velvet interior and broken cup holders and a dirty windshield with the front right tire being 2" inches smaller than the others. So what are you waiting for, enter your social security number and tell us in the comments how YOU would use your brand new user Toyota! (Satisfaction not guaranteed, batteries not included, sudden death may occur after inputting code, Raid55 LLC is not responsible for any damage to the computer and/or to the user that may or may not occur after use and/or prolonged use of product, Raid55 LLC makes no guaranty to not steal your information and store it in the cloud for machine learning purposes, please consult your local physician and/or doctor for more information)
OLD VERSION (no longer works after a valve update for whatver reason...its not like anything changed UI wise on that page)
// not that great but it works... so yea, its not like we need to optimal time and space complexity for this one
Object.values(document.getElementsByClassName("help_purchase_price")) // gets all elements with class "help_purchase_price" the class that holds all the prices
.map(el => el.className === "help_purchase_price"? el.innerHTML : null) //removes all strike through transactions
.filter(el => el) // removes all null values
.filter(el => el[0] === "$") // checking for invalid transactions
.map(el => el.slice(1, el.length)) // cuts dollar sign for adding
.reduce((accu, el) => accu + Number(el), 0) //reduces array into 1 number
I spent $1118 dollars on CS:GO from 2014 till now, this was only for valve issued in-game purchases, not Steam Market. I feel not good... I am going to rethink my budgeting methods...