click to redirect on index page when file is empty
This commit is contained in:
parent
15c67e403f
commit
db83f9e445
1 changed files with 8 additions and 1 deletions
|
@ -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 = {
|
||||
|
|
Reference in a new issue