enable downloading log as a CSV
jywarren opened this issue · comments
It'd be great to be able to download the log as a CSV! Of course, you can just copy and paste it into a file right now. But still, a one-click button would be nice!
var csv = connection.history.received.join('\n'); // the CSV data
// old school, but doesn't seem to work for me?
window.open("data:text/csv;charset=utf-8," + escape(csv));
or generate a link: https://stackoverflow.com/questions/17564103/using-javascript-to-download-file-as-a-csv-file
<a href="data:text/csv;charset=utf-8,'+escape(csv)+'" download="webjack.csv">download</a>
We should put the timestamp (and ideally the better-formatted date + time) in the filename; new Date().toJSON().slice(0,10).replace(/-/g,'/');
gets the date, and we can add timestamp after that maybe...
Let's put the button here!
Lines 55 to 58 in ce5d2a9
Hey, if its still open, can I claim it?
Hello!
Just wondering if there's been any progress on this? I'd like to submit a pull request if its still open.