mirror of
https://github.com/miljegen/browser-milje.git
synced 2025-09-01 00:43:44 +00:00
let's try indexdb
This commit is contained in:
13
scripts/popup.js
Normal file
13
scripts/popup.js
Normal file
@@ -0,0 +1,13 @@
|
||||
document.getElementById('uploadButton').addEventListener('click', async () => {
|
||||
const miljeInput = document.getElementById('fileInput');
|
||||
const milje = miljeInput.files[0];
|
||||
|
||||
if(!milje) {
|
||||
alert("Please select a milje.");
|
||||
return;
|
||||
}
|
||||
|
||||
const base64Milje = await convertImageToBase64(milje);
|
||||
await saveImage(base64Milje);
|
||||
await displayImage(base64Milje);
|
||||
})
|
Reference in New Issue
Block a user