From 59b4cd231a31fd76e541afdf7e568c0663075555 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Sun, 11 May 2014 00:22:34 -0700 Subject: [PATCH] undelete_all() No key binding, as a precaution against bumping it accidentally that's easier than implementing confirmation. --- picsorter.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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"); +} -- 2.44.1