Skip to content

Instantly share code, notes, and snippets.

@sjwilliams
Created November 27, 2016 01:58
Show Gist options
  • Save sjwilliams/2202c2fbf4ba99cde1862fa789aeed68 to your computer and use it in GitHub Desktop.
Save sjwilliams/2202c2fbf4ba99cde1862fa789aeed68 to your computer and use it in GitHub Desktop.
Sum Amazon orders per page under "Your Orders"
Array.prototype.slice.call(document.querySelectorAll('.a-span2 .value')).map(function(value){return Number(value.textContent.replace('$', '').trim())}).reduce(function(a,b){return a + b}, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment