Last active
January 18, 2017 09:09
-
-
Save fisknils/af3c6a98ac3385ea1bf6bb109eb7b6a9 to your computer and use it in GitHub Desktop.
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
// patchjob javascript to parse the contents of | |
// https://www.coinbase.com/accounts/*# | |
// since there's no export | |
// work in progress | |
// this just gets each line's source and target currency + volumes and prints it as a multi- dimensional object | |
// into the developer console | |
// you should NEVER run ANY scripts on ANY authenticated page unless you understand EXACTLY what the code does | |
// OR if you WANT trouble. | |
var ar = []; | |
jQuery('div.tx-amount__wrapper').each(function(i){ | |
var r = []; | |
jQuery('span',this).each(function(index){ | |
cur = jQuery(this).text().trim().match(/ ([A-Z]+)$/); | |
vol = jQuery(this).text().trim().match(/([0-9\.]+)/); | |
var o = { | |
'cur': cur[1], | |
'vol': vol[1] | |
}; | |
r.push(o); | |
}); | |
ar.push(r); | |
}); | |
console.log(ar); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment