From 4666ddaf97c0bc7ff3ecea24fe9cc9a4e08c0f7f Mon Sep 17 00:00:00 2001 From: Reimar Date: Fri, 9 Jan 2026 08:36:58 +0100 Subject: [PATCH] Add canonical, fix no file selected error --- public/assets/scripts/main.js | 6 ++---- public/index.html | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/public/assets/scripts/main.js b/public/assets/scripts/main.js index 9275d99..c2b6ed7 100644 --- a/public/assets/scripts/main.js +++ b/public/assets/scripts/main.js @@ -22,15 +22,13 @@ fileSelector.onFileSelected = file => { async function compress(filesize, filesizeUnit) { document.getElementById("uploaded-video").pause(); - const sectionChangePromise = showSection("loading"); - if (!fileSelector.selectedFile) { - await sectionChangePromise; // Avoid changing sections at the same time alert("Please select a file"); - return; } + const sectionChangePromise = showSection("loading"); + const videoLength = document.getElementById("uploaded-video").duration; let targetFilesize; diff --git a/public/index.html b/public/index.html index 6ffd1ec..5ac3f23 100644 --- a/public/index.html +++ b/public/index.html @@ -8,6 +8,7 @@ +