Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Parse transactions in capitalone and print into console
// ==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