Skip to content

Commit

Permalink
Update content.js
Browse files Browse the repository at this point in the history
- Change date format from US (mmddyy) to GB (ddmmyy)
  • Loading branch information
kazcfz committed Sep 24, 2024
1 parent f3058b8 commit a466252
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ function handleFileInputClick(event) {
const readPromises = Array.from(dataTransfer.files).map(file => {
let filename = file.name;
if (!filename || filename == 'image.png')
filename = 'CnP_'+new Date().toLocaleString('en-US', {hour12: false}).replace(/, /g, '_').replace(/[\/: ]/g, '')+'.'+file.type.split('/').pop();
filename = 'CnP_'+new Date().toLocaleString('en-GB', {hour12: false}).replace(/, /g, '_').replace(/[\/: ]/g, '')+'.'+file.type.split('/').pop();
fileList.items.add(new File([file], filename, { type: file.type }));
return readFileAsDataURL(file);
});
Expand Down

0 comments on commit a466252

Please sign in to comment.