]> git.scottworley.com Git - picsort/commitdiff
A manually-callable cleanup utility
authorScott Worley <scottworley@scottworley.com>
Sat, 13 Sep 2014 16:23:59 +0000 (09:23 -0700)
committerScott Worley <scottworley@scottworley.com>
Sat, 13 Sep 2014 16:23:59 +0000 (09:23 -0700)
picsorter.js

index 31091fa8de234677a3165d7c4d085bd1bd4508b1..1f6b8f053da082a13c294005022b446c960216c1 100644 (file)
@@ -221,6 +221,18 @@ Mousetrap.bind('%', function() { say((100 * input_index / files.length).toFixed(
 Mousetrap.bind('!', show_commands);
 Mousetrap.bind('esc', function() { $("#name").hide(); $("#shell_out").hide(); });
 
 Mousetrap.bind('!', show_commands);
 Mousetrap.bind('esc', function() { $("#name").hide(); $("#shell_out").hide(); });
 
+function clean_picinfo() {
+  files_index = {};
+  $.each(files, function(i, f) {
+    files_index[f] = true;
+  });
+  for (f in picinfo) {
+    if (!files_index[f]) {
+      delete picinfo[f];
+    }
+  }
+}
+
 function undelete_all() {
   for (f in picinfo) {
        delete picinfo[f].deleted;
 function undelete_all() {
   for (f in picinfo) {
        delete picinfo[f].deleted;