diff --git a/build.sh b/build.sh index 7b1bbfb..6af0241 100755 --- a/build.sh +++ b/build.sh @@ -13,4 +13,3 @@ mkdir -p public/assets/scripts fetch ffmpeg 0.12.15 fetch core 0.12.10 - diff --git a/public/assets/scripts/main.js b/public/assets/scripts/main.js index 4277c16..4119a6e 100644 --- a/public/assets/scripts/main.js +++ b/public/assets/scripts/main.js @@ -50,6 +50,11 @@ function openFileSelector() { document.getElementById("file-drop-area").onclick = openFileSelector; document.getElementById("change-file").onclick = openFileSelector; +document.getElementById("file-drop-area").onkeydown = event => { + if (['Enter', 'Space'].includes(event.code)) + openFileSelector(); +}; + document.getElementById("file-input").oninput = () => { setTimeout(() => { const file = document.getElementById("file-input").files[0]; diff --git a/public/index.html b/public/index.html index cd9ef45..22207d3 100644 --- a/public/index.html +++ b/public/index.html @@ -13,7 +13,7 @@

Compress video files to a specific file size, so you can upload them to your favorite social media and messaging apps!

-
+
Drag and drop a file here!
@@ -31,7 +31,7 @@ - +