diff --git a/main.js b/main.js index 5742c78..6d73cf8 100644 --- a/main.js +++ b/main.js @@ -275,6 +275,11 @@ var commands = [ { hint: "Sort todo.txt list", action: sorttodotxt +}, +{ + hint: "Download encrypted data", + remoteonly: true, + action: downloadencrypted }]; var snippets = [ @@ -1146,6 +1151,16 @@ function downloadvault() download("notes " + timestamp() + " " + currentvault + ".json", window.localStorage.getItem(currentvault)); } + +function downloadencrypted() +{ + encryptstring(JSON.stringify(localdata)) + .then(encrypted => + { + download("encrypted notes " + timestamp() + " " + currentvault + ".acs", encrypted); + }); +} + function downloadnotewithsubs() { var note = withsubs();