click to redirect on index page when file is empty

This commit is contained in:
Mylloon 2022-10-28 22:24:36 +02:00
parent 15c67e403f
commit db83f9e445
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -81,7 +81,14 @@ const send = (file, element) => {
element = update(element, "Chiffrement du fichier...", "H3");
if (content.length == 0) {
update(element, "Fichier vide.", "H3");
update(
element,
"Fichier vide, cliquez pour revenir en arrière.",
"H3"
).parentElement.addEventListener("click", () => {
location.href = "/";
});
return;
}
let data = {