Add canonical, fix no file selected error

This commit is contained in:
Reimar 2026-01-09 08:36:58 +01:00
parent 4bfe32d020
commit 4666ddaf97
Signed by: Reimar
GPG Key ID: 93549FA07F0AE268
2 changed files with 3 additions and 4 deletions

View File

@ -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;

View File

@ -8,6 +8,7 @@
<script defer src="/assets/scripts/ffmpeg/package/dist/umd/ffmpeg.js"></script>
<script defer src="/assets/scripts/ui.js"></script>
<script defer type="module" src="/assets/scripts/main.js"></script>
<link rel="canonical" href="https://compact.video/">
<link rel="shortcut icon" href="/assets/images/icon.png">
<link rel="apple-touch-icon" href="/assets/images/icon.png">
<link rel="stylesheet" href="/assets/styles/main.css">