Last active
August 6, 2016 15:58
-
-
Save kylehotchkiss/85fe8782dddcff3d11aadf68bb29fd19 to your computer and use it in GitHub Desktop.
Chase.com Credit Cards: Get Rewards for next statement. This works on their new 2016 redesign. I don't get why they don't just show the total accumulated points in real time like Capital One does.
This file contains hidden or 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
(function() { | |
if ( window.location.host.indexOf('chase.com') !== -1 ) { | |
jQuery('.details-label').click(); | |
alert('Calculating rewards, please wait 5 seconds for all transactions to load...') | |
setTimeout(function() { | |
var total = 0; | |
jQuery('[data-attr="CREDIT_ACCOUNT_ACTIVITY_ALL_TRANSACTIONS.transactions.totalTransactionRewardsEarned"]').each(function() { | |
var amount = jQuery(this).text(); | |
amount = amount.replace(',', ''); | |
total += Number( amount ); | |
}); | |
var formattedTotal = '$' + (total / 100).toFixed(2); | |
alert( 'Your rewards total for this billing cycle is ' + formattedTotal ); | |
}, 5000); | |
} | |
})(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment