Created
April 24, 2019 21:06
-
-
Save niklasschroetler/49367649f390ea514731c342bac41327 to your computer and use it in GitHub Desktop.
Paste this script into the console of an Amazon List view or add it to a plugin like cjs to get the sum of all items in the list
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 a = document.querySelectorAll(".a-price-whole"); | |
var f = document.querySelectorAll(".a-price-fraction"); | |
var s = 0; | |
for (var i = 0; i < a.length; i++) { | |
s = parseInt(a[i].innerText.substring(0, a[i].innerText.length - 1)) + s; | |
s = (parseInt(f[i].innerText) / 100) + s | |
} | |
console.log("Your List Price: " + s + " Euro"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment