feature/prevent-from-accident-reloading (#1411)

## Description:

Added prevention from accident reload of page

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [ ] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

@qqkedsi
<img width="526" height="896" alt="image"
src="https://github.com/user-attachments/assets/22b273a5-de50-4567-93f0-353cea36ea29"
/>
This commit is contained in:
falc
2025-08-02 08:36:22 +03:00
committed by GitHub
parent 4626f4dc4a
commit ac8a841e40
+4
View File
@@ -413,6 +413,10 @@
document.documentElement.classList.remove("preload");
});
});
window.addEventListener("beforeunload", function (e) {
e.preventDefault();
e.returnValue = "Are you sure you want to leave?";
});
</script>
<!-- Playwire ads -->