From: Scott Worley Date: Sun, 11 May 2014 07:22:34 +0000 (-0700) Subject: undelete_all() X-Git-Url: http://git.scottworley.com/picsort/commitdiff_plain/59b4cd231a31fd76e541afdf7e568c0663075555?ds=sidebyside;hp=20f5e5b6d7a268119d2b4794d892b7d384bb0ad7 undelete_all() No key binding, as a precaution against bumping it accidentally that's easier than implementing confirmation. --- diff --git a/picsorter.js b/picsorter.js index 31a6a56..aff0fee 100644 --- a/picsorter.js +++ b/picsorter.js @@ -212,3 +212,11 @@ Mousetrap.bind('C', function() { if (last_name) { set_name(last_name); } }); Mousetrap.bind('%', function() { say((100 * input_index / files.length).toFixed(2) + "%"); }); Mousetrap.bind('!', show_commands); Mousetrap.bind('esc', function() { $("#name").hide(); $("#shell_out").hide(); }); + +function undelete_all() { + for (f in picinfo) { + delete picinfo[f].deleted; + } + save_picinfo(); + say("Undeleted everything"); +}