pixel-editor/js/_onbeforeunload.js

8 lines
197 B
JavaScript
Raw Normal View History

2019-03-27 02:20:54 +03:00
//prevent user from leaving page with unsaved data
window.onbeforeunload = function() {
2020-04-04 10:41:56 +03:00
if (documentCreated)
return 'You will lose your pixel if it\'s not saved!';
else return;
};