Last active
April 2, 2024 20:15
Trendyol Toplam Harcama Hesaplayıcı
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
// Trendyol'da yaptığınız toplam harcamayı hesaplar. | |
// https://www.trendyol.com/hesabim/siparislerim sayfasına gidin. | |
// Tüm siparişleri listeleyin. | |
// Console'da function'ı çağırın. => calculateTotalPrice(); | |
function calculateTotalPrice() { | |
let totalPrice = 0; | |
let prices = document.querySelectorAll('#orders-container .order .order-header .order-header-info:nth-child(4) b').forEach(function(item, index) { | |
totalPrice += parseFloat(item.innerText.replace(',', '.')); | |
}); | |
return totalPrice; // example: 1614.7700000000002 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
trendyol toplam harcamam