mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
first commit
This commit is contained in:
7
js/_onbeforeunload.js
Normal file
7
js/_onbeforeunload.js
Normal file
@ -0,0 +1,7 @@
|
||||
//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;
|
||||
}
|
Reference in New Issue
Block a user