prompt before closing tab mid-upload
This commit is contained in:
parent
b2ee4ff7a8
commit
4276189595
|
@ -29,6 +29,12 @@ let progressRate;
|
||||||
let progressEta;
|
let progressEta;
|
||||||
let progressBar;
|
let progressBar;
|
||||||
|
|
||||||
|
window.addEventListener('beforeunload', (event) => {
|
||||||
|
if (socket && socket.readyState !== 3) {
|
||||||
|
event.returnValue = "Upload is still in progress!";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
document.body.className = 'landing';
|
document.body.className = 'landing';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue