Skip to content

Instantly share code, notes, and snippets.

@kylegibson
Last active October 13, 2016 04:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kylegibson/3398446 to your computer and use it in GitHub Desktop.
Save kylegibson/3398446 to your computer and use it in GitHub Desktop.
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