Skip to content

Instantly share code, notes, and snippets.

@nettofarah
Created August 12, 2016 00:42
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 nettofarah/50f4858b2457f1615381650033641576 to your computer and use it in GitHub Desktop.
Save nettofarah/50f4858b2457f1615381650033641576 to your computer and use it in GitHub Desktop.
Real Balance (Pending + Current) for Mint.com
javascript:void(function() {
var pending = jQuery('.pending').find('td:last');
var values = Array.from(pending).map(td => jQuery(td).text().replace("$", "").replace("–", "-"));
values = values.filter(val => jQuery.trim(val)).map(parseFloat);
var pendingTotal = values.reduce((val, current) => val + current);
var currentTotalElement = jQuery('.account').first().find('.money').last();
var currentTotal = parseFloat(currentTotalElement.text().replace("–", "-").replace("$", ""));
var realTotal = currentTotal + pendingTotal;
currentTotalElement.text(currentTotal + ' + ' + pendingTotal.toFixed(2) + ' = ' + realTotal.toFixed(2));
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment