Last active
October 13, 2016 04:20
-
-
Save kylegibson/3398446 to your computer and use it in GitHub Desktop.
Parse transactions in capitalone and print into console
This file contains 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
// ==UserScript== | |
// @name capitalone | |
// @namespace kyle | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js | |
// @include https://servicing.capitalone.com/* | |
// @grant none | |
// ==/UserScript== | |
// | |
$(function() { | |
var data = []; | |
$('.trxSummayRow').each(function(i, v) { | |
var date = $.trim($('.dateColumn', v).text()); | |
var desc = $.trim($('.descriptionColumn', v).text()); | |
var cat = $.trim($('.categoryColumn', v).text()); | |
var amount = $.trim($('.amountColumn', v).text()); | |
data.unshift([date, desc, cat, amount]); | |
}); | |
var results = []; | |
$.each(data, function(i, v) { | |
results.push(v.join('\t')); | |
}); | |
var $ta = $('<textarea>'); | |
$('body').append($ta); | |
$ta.val(results.join('\n')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment