X-Git-Url: http://git.scottworley.com/picsort/blobdiff_plain/8a9d6b07d5933eb8aab9dad991f3510d141e0f5f..8cec3490a14ec25bd4cd58797d1d959dd7cb84ff:/picsorter.js?ds=inline diff --git a/picsorter.js b/picsorter.js index b8b1804..1f6b8f0 100644 --- a/picsorter.js +++ b/picsorter.js @@ -52,7 +52,7 @@ function setpic() { function say(message) { $("#message").text(message).removeClass("fade"); - setTimeout(function() { $("#message").addClass("fade"); }, 1); + setTimeout(function() { $("#message").addClass("fade"); }, 100); } function announce() { say(input_index + " " + (picinfo[files[input_index]].name || "")); @@ -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(); }); +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;