Skip to content

Instantly share code, notes, and snippets.

@bhdicaire
Forked from krishpop/export-toby.js
Created March 14, 2018 23:24
Show Gist options
  • Save bhdicaire/82634077aaee6188c72c9cce04e6309a to your computer and use it in GitHub Desktop.
Save bhdicaire/82634077aaee6188c72c9cce04e6309a to your computer and use it in GitHub Desktop.
Export Toby
chrome.storage.local.get("state", o => (
((f, t) => {
let e = document.createElement("a");
e.setAttribute("href", `data:text/plain;charset=utf-8,${encodeURIComponent(t)}`);
e.setAttribute("download", f);
e.click();
})(`TobyBackup${Date.now()}.json`, o.state)
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment