ipvfoo
ipvfoo copied to clipboard
Add option to save data!
Not sure if you can do this in the chrome sandbox. It'd be cool to be able to log URLs with their IPV4/IPV6 status to a CSV file or something. Maybe create a google sheet?
@mikeadamz
something like this should work added to src/popup.js https://github.com/pmarks-net/ipvfoo/blob/f91c7da5bedca80a1e95a6e9a3b4f9ef7dccacd0/src/popup.js
const rows = [
["name1", "city1", "some other info"],
["name2", "city2", "more info"]
];
let csvContent = "data:text/csv;charset=utf-8,"
+ rows.map(e => e.join(",")).join("\n");
var encodedUri = encodeURI(csvContent);
window.open(encodedUri);
https://stackoverflow.com/a/14966131/5283424
or
const rows = [
["name1", "city1", "some other info"],
["name2", "city2", "more info"]
];
let csvContent = "data:text/csv;charset=utf-8,"
+ rows.map(e => e.join(",")).join("\n");
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("download", "my_data.csv");
document.body.appendChild(link); // Required for FF
link.click();