mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Added JSCS linter to enforce style conventions
This commit is contained in:
@@ -5,19 +5,18 @@
|
||||
this.piskelController = piskelController;
|
||||
};
|
||||
|
||||
|
||||
ns.BeforeUnloadService.prototype.init = function () {
|
||||
window.addEventListener("beforeunload", this.onBeforeUnload.bind(this));
|
||||
window.addEventListener('beforeunload', this.onBeforeUnload.bind(this));
|
||||
};
|
||||
|
||||
ns.BeforeUnloadService.prototype.onBeforeUnload = function (evt) {
|
||||
pskl.app.backupService.backup();
|
||||
if (pskl.app.savedStatusService.isDirty()) {
|
||||
var confirmationMessage = "Your Piskel seems to have unsaved changes";
|
||||
var confirmationMessage = 'Your Piskel seems to have unsaved changes';
|
||||
|
||||
(evt || window.event).returnValue = confirmationMessage;
|
||||
return confirmationMessage;
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user