]>
git.scottworley.com Git - picsort/blob - picsorter.js
e44c22cad9abb5c79b5bdb1a23f9135b14a93fef
5 if (!("picsorter_deleted" in localStorage
)) {
6 localStorage
.picsorter_deleted
= JSON
.stringify({});
8 var picsorter_deleted
= JSON
.parse(localStorage
.picsorter_deleted
);
11 $("#pic").attr("src", zoom
+ exposure
+ "/" + files
[input_index
]);
14 function toggle_zoom() {
22 function move_to_nondeleted(direction
) {
24 input_index
+= direction
;
25 } while (files
[input_index
] in picsorter_deleted
);
28 function mark_deleted() {
29 picsorter_deleted
[files
[input_index
]] = 1;
30 localStorage
.picsorter_deleted
= JSON
.stringify(picsorter_deleted
);
33 function mark_not_deleted() {
34 delete picsorter_deleted
[files
[input_index
]];
35 localStorage
.picsorter_deleted
= JSON
.stringify(picsorter_deleted
);
42 Mousetrap
.bind('z', function() { toggle_zoom(); setpic(); });
43 Mousetrap
.bind('Z', function() { $("#pic").toggleClass("fit_view"); });
44 Mousetrap
.bind('n', function() { move_to_nondeleted(1); setpic(); });
45 Mousetrap
.bind('p', function() { move_to_nondeleted(-1); setpic(); });
46 Mousetrap
.bind('N', function() { input_index
++; setpic(); });
47 Mousetrap
.bind('P', function() { input_index
--; setpic(); });
48 Mousetrap
.bind('b', function() { exposure
++; setpic(); });
49 Mousetrap
.bind('d', function() { exposure
--; setpic(); });
50 Mousetrap
.bind('x', function() { mark_deleted(); });
51 Mousetrap
.bind('X', function() { mark_not_deleted(); });