How Can We Help?
Created On
byDoctor West
Print Donation amount
function(){
var amount = extractMoney(document.getElementsByClassName('text-left')[0].innerText); console.log(amount['amount']);
return amount['amount'];
}
Trigger
Use Element Visibility and look for class name – .thankyou-icon
Special Note
Must add this to every page where amount is needed
var extractMoney = function(string) {
var amount = string.match(/[0-9]+([,.][0-9]+)?/)
var unit = string.replace(/[0-9]+([,.][0-9]+)?/, "")
if (amount && unit) {
return {
amount: +amount[0].replace(",", "."),
currency: unit
}
}
return null;
}