Drag this link into your bookmarks bar, and click it when you're looking at your transactions on mint.com!
Annotated code below.
- // Inject jQuery
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') +'ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
- // Poll until jQuery has loaded
- var interval = setInterval(function(){
- if (typeof(jQuery) !== 'undefined'){
- var total = 0;
- // Target the transaction list table and do some fancy string manipulation
- $('#transaction-list-body').find('tr').each(function(){
- total += parseFloat($(this).find('.money').text().replace('$','').replace(',','').replace('–','-'), 10);
- $(this).append($('<td />').text(total.toFixed(2)));
- });
- clearInterval(interval);
- }
- }, 100);
No comments:
Post a Comment