Make image filenames be the date and time of capture
parent
c1075b8295
commit
2e4ac82d15
|
|
@ -717,6 +717,8 @@ document.addEventListener('DOMContentLoaded', function (event) {
|
|||
try {
|
||||
var dataURL = canvas.toDataURL('image/jpeg');
|
||||
saveButton.href = dataURL;
|
||||
var d = new Date();
|
||||
saveButton.download = d.getFullYear() + ("0"+(d.getMonth()+1)).slice(-2) + ("0" + d.getDate()).slice(-2) + ("0" + d.getHours()).slice(-2) + ("0" + d.getMinutes()).slice(-2) + ("0" + d.getSeconds()).slice(-2) + ".jpg";
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -744,6 +744,8 @@ document.addEventListener('DOMContentLoaded', function (event) {
|
|||
try {
|
||||
var dataURL = canvas.toDataURL('image/jpeg');
|
||||
saveButton.href = dataURL;
|
||||
var d = new Date();
|
||||
saveButton.download = d.getFullYear() + ("0"+(d.getMonth()+1)).slice(-2) + ("0" + d.getDate()).slice(-2) + ("0" + d.getHours()).slice(-2) + ("0" + d.getMinutes()).slice(-2) + ("0" + d.getSeconds()).slice(-2) + ".jpg";
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue