Skip to content

Instantly share code, notes, and snippets.

@michaeljs1990
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaeljs1990/1a7b29ab2c52c710c3ac to your computer and use it in GitHub Desktop.
Save michaeljs1990/1a7b29ab2c52c710c3ac to your computer and use it in GitHub Desktop.
GrubHub Total
! function(e) {
t = 0;
for (n in e) "object" == typeof e[n] && (p = e[n].getElementsByClassName("amountColumn")[0].innerText, t += Number(p.replace(/[^0-9\.]+/g, "")))
console.log(t)
}(document.getElementsByClassName("totalRow"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment