Skip to content

Instantly share code, notes, and snippets.

@nwalke
Created January 10, 2020 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nwalke/c45f8cb7bceecd0c32e8e0a1055ea070 to your computer and use it in GitHub Desktop.
Save nwalke/c45f8cb7bceecd0c32e8e0a1055ea070 to your computer and use it in GitHub Desktop.
Synchrony Promotional Balance Finder Script
var amount = 0;
$('#promotionalPurchaseList li').each(function(index) {
var currency = $(this).find('.activityAmtBlock .balanceAmount:first').text().trim().replace(/[^0-9.-]+/g,"")
if (currency) { amount += Number(currency)}
})
console.log("Total promo balance is " + amount.toFixed(2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment