Name this and call it rather than copy/pasting it around.
Also, fix a bug where change_exposure() should have been saving picinfo
but wasn't.
-localStorage.picsorter_picinfo = JSON.stringify(picinfo);
+function save_picinfo() {
+ localStorage.picsorter_picinfo = JSON.stringify(picinfo);
+}
+save_picinfo();
var exposure = 20;
var zoom = "sm/";
var exposure = 20;
var zoom = "sm/";
exposure = picinfo[files[input_index]].exposure;
} else {
picinfo[files[input_index]].exposure = exposure;
exposure = picinfo[files[input_index]].exposure;
} else {
picinfo[files[input_index]].exposure = exposure;
- localStorage.picsorter_picinfo = JSON.stringify(picinfo);
}
$("#pic").attr("src", zoom + exposure + "/" + files[input_index]);
}
}
$("#pic").attr("src", zoom + exposure + "/" + files[input_index]);
}
function mark_deleted() {
picinfo[files[input_index]].deleted = 1;
function mark_deleted() {
picinfo[files[input_index]].deleted = 1;
- localStorage.picsorter_picinfo = JSON.stringify(picinfo);
say("Deleted");
}
function mark_not_deleted() {
delete picinfo[files[input_index]].deleted;
say("Deleted");
}
function mark_not_deleted() {
delete picinfo[files[input_index]].deleted;
- localStorage.picsorter_picinfo = JSON.stringify(picinfo);
say("Undeleted");
}
function change_exposure(amount) {
exposure += amount;
picinfo[files[input_index]].exposure = exposure;
say("Undeleted");
}
function change_exposure(amount) {
exposure += amount;
picinfo[files[input_index]].exposure = exposure;
setpic();
var display_exposure = (exposure / 4) - 3.5;
say((display_exposure >= 0 ? "+" : "") + display_exposure);
setpic();
var display_exposure = (exposure / 4) - 3.5;
say((display_exposure >= 0 ? "+" : "") + display_exposure);