Skip to content

Instantly share code, notes, and snippets.

@b1naryth1ef
Created June 26, 2016 05:42
Show Gist options
  • Save b1naryth1ef/308e999bd1b1f49a7a371b01a6a1da32 to your computer and use it in GitHub Desktop.
Save b1naryth1ef/308e999bd1b1f49a7a371b01a6a1da32 to your computer and use it in GitHub Desktop.
Steam
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
jQuery.noConflict();
var total = 0;
jQuery("td.wht_total").each(function (_, x) {
var amount = x.innerText.split("\n")[0].substr(1);
amount = parseFloat(amount);
if (isNaN(amount)) return;
total += amount;
});
console.log("Woah there, looks like you spent $" + total + " on steam!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment