update: prevent user refresh

This commit is contained in:
rick 2021-08-31 14:44:12 +02:00
parent 4e7a541795
commit 7ee7676d6d
Signed by: Rick
GPG key ID: 2B593F087240EE99

View file

@ -21,10 +21,14 @@
let tmp = document.createTextNode(elem); let tmp = document.createTextNode(elem);
let newP = document.createElement("p"); let newP = document.createElement("p");
newP.appendChild(tmp); newP.appendChild(tmp);
document.getElementById("my-list").appendChild(newP) document.getElementById("my-list").appendChild(newP);
} }
} }
} }
window.onbeforeunload = function() {
return "Vous perdrez tous les artistes trouvés en rafraichissant la page."
}
setInterval(test, 3000); setInterval(test, 3000);
</script> </script>
<html> <html>