diff --git a/js/editor.js b/js/editor.js index 7bb0e46..9d98679 100644 --- a/js/editor.js +++ b/js/editor.js @@ -82,6 +82,9 @@ window.addEventListener("load", () => { reader.readAsDataURL(files[0]); } }); + + window.addEventListener('beforeunload', + e => e.returnValue = "Unsaved changes blah blah"); }); function downloadFile(file, name) {