Created
June 16, 2016 17:36
-
-
Save onderaltintas/5bb275a0e567d922835bd6870799b445 to your computer and use it in GitHub Desktop.
Counts total money of your steam market listings. Usage: Copy script -> go to my active listings -> right click on page -> inspect element -> console -> paste -> enter
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
// Usage: Copy script -> community -> market -> go to my active listings -> right click on page -> | |
// inspect element -> console -> paste -> enter | |
var sumAll = function() | |
{ | |
var pageContent = document.body.innerHTML; | |
var regX = /\((.?[0-9].[0-9][0-9]).*?\)/g | |
var matches = pageContent.match(regX) | |
var total = 0; | |
for(var i = 0; i < matches.length;i++) | |
{ | |
var val = matches[i].split(" ")[0].replace("(","").replace(",","."); | |
total+=parseFloat(val); | |
console.log("Sum:"+total+" + "+matches[i]) | |
} | |
alert("You will earn "+total+" if you sell all items"); | |
} | |
sumAll(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment