pixel-editor/js/_onbeforeunload.js
2019-03-26 23:20:54 +00:00

7 lines
191 B
JavaScript

//prevent user from leaving page with unsaved data
window.onbeforeunload = function() {
if (documentCreated)
return 'You will lose your pixel if it\'s not saved!';
else return;
}