pixel-editor/js/_onbeforeunload.js
2020-04-12 10:58:19 +02:00

8 lines
197 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;
};