]> git.scottworley.com Git - picsort/commitdiff
undelete_all()
authorScott Worley <scottworley@scottworley.com>
Sun, 11 May 2014 07:22:34 +0000 (00:22 -0700)
committerScott Worley <scottworley@scottworley.com>
Sun, 11 May 2014 07:22:34 +0000 (00:22 -0700)
No key binding, as a precaution against bumping it accidentally that's
easier than implementing confirmation.

picsorter.js

index 31a6a560da9b59e9208a153c494f59dd6a86360c..aff0fee88ef2436fbf5823fb02c5818956f007e0 100644 (file)
@@ -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");
+}