Skip to content

Instantly share code, notes, and snippets.

View Pandry's full-sized avatar

Pandry Pandry

  • Italy
View GitHub Profile
@Pandry
Pandry / amazonListPriceCalculator.js
Last active July 8, 2017 13:13
Little code to paste in the console to get the price of a list on amazon. (You need to open the list than execute the code)
var elementPrice = document.getElementsByClassName("a-size-base a-color-price a-text-bold");
var elementusedprice = document.getElementsByClassName("a-color-price itemUsedAndNewPrice");
var countedItems = 0;
var totalprice = 0.0;
for (var i = 0; i < elementPrice.length; i++){
var price = parseFloat(elementPrice[i].innerText.replace(",",".").substring(4));
if(isNaN(price)){
price = parseFloat(elementusedprice[i].innerText.replace(",",".").substring(4));
}
if(!isNaN(price)){