Created
January 15, 2014 22:55
-
-
Save smerchek/8446405 to your computer and use it in GitHub Desktop.
Sum the items in an Amazon wish list (inspired by "Total up the cost of all items in an Amazon wishlist" https://gist.github.com/chrismbarr/3230548)
This file contains 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
var list = $$("span.a-color-price.a-size-base"); | |
var total=0; | |
for(i=0; i<list.length;i++){ | |
total += parseFloat(list[i].innerText.replace("$","")); | |
} | |
alert(list.length+" items for a total of: $"+total.toFixed(2)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment