Forked from rudiedirkx/ing-creditcard-export.js
Last active
December 30, 2017 14:16
-
-
Save frankgeerlings/edbd3935f858112437eaa8eb270a1d17 to your computer and use it in GitHub Desktop.
Mijn ING creditcard statement export as text, including detail rows
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
javascript: (function(f, a) { | |
f = new Blob( | |
[ | |
[].map.call(document.querySelectorAll('#dscardsdetailsandtransactions tr.riaf-datatable-contents, #dscardsdetailsandtransactions td.riaf-datatable-details-contents'), | |
tr => tr.querySelector('table') ? [].map.call(tr.querySelectorAll('tr'), | |
detail => | |
' ' + detail.querySelector('td:first-of-type').textContent.trim() + ": " + | |
detail.querySelector('td:last-of-type').textContent.trim() | |
).join('\r\n') | |
: ["Datum: " + tr.querySelector('td.riaf-datatable-column-date').textContent.trim(), | |
"Bedrag: " + tr.querySelector('td.riaf-datatable-column-amount').textContent.trim(), | |
"Bij/af: " + (tr.querySelector('.riaf-datatable-icon-crdb-cr') ? 'Bij' : 'Af')].join('\r\n') | |
).join('\r\n\r\n')], {type: 'text/plain'}); | |
a = document.createElement('a'); | |
a.download = 'trans.txt'; | |
a.href = URL.createObjectURL(f); | |
a.click(); | |
})(); void(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! Required everything on a single line and filenames related to timerange: