mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2026-02-06 11:17:36 +00:00
Rename to EJS_disableAutoUnload
This commit is contained in:
parent
84d09b8e0f
commit
5ab0ebf025
@ -127,6 +127,7 @@
|
||||
config.browserMode = window.EJS_browserMode;
|
||||
config.shaders = Object.assign({}, window.EJS_SHADERS, window.EJS_shaders ? window.EJS_shaders : {});
|
||||
config.fixedSaveInterval = window.EJS_fixedSaveInterval;
|
||||
config.disableAutoUnload = window.EJS_disableAutoUnload;
|
||||
|
||||
let systemLang;
|
||||
try {
|
||||
|
||||
@ -1159,9 +1159,9 @@ class EmulatorJS {
|
||||
}, 0);
|
||||
});
|
||||
this.addEventListener(window, "beforeunload", (e) => {
|
||||
if (window.EJS_askBeforeUnload) {
|
||||
if (this.config.disableAutoUnload) {
|
||||
e.preventDefault();
|
||||
e.returnValue = '';
|
||||
e.returnValue = "";
|
||||
return
|
||||
}
|
||||
if (!this.started) return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user