https://app.buynowstores.com/purchases
ابتدا تا پایین لیست اسکرول کنید و سپس اسکریپت رو در تب console وارد کنید.
https://app.buynowstores.com/purchases
ابتدا تا پایین لیست اسکرول کنید و سپس اسکریپت رو در تب console وارد کنید.
var total = 0; | |
const paid_amounts = document.getElementsByClassName("purchase-amount-number"); | |
var persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g]; | |
var arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g]; | |
fixNumbers = function (str) | |
{ | |
if(typeof str === 'string') | |
{ | |
for(var i=0; i<10; i++) | |
{ | |
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i); | |
} | |
} | |
return str.trim().replace(",", ""); | |
}; | |
for(paid_amount_element of paid_amounts) | |
{ | |
total += parseInt(fixNumbers(paid_amount_element.innerHTML)); | |
} |