Skip to content

Instantly share code, notes, and snippets.

@sjwilliams sjwilliams/amazonsum

Created Nov 27, 2016
Embed
What would you like to do?
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
You can’t perform that action at this time.