Prettified Code!
This commit is contained in:
parent
eeb25b8915
commit
82ca6269d2
1 changed files with 9 additions and 7 deletions
|
@ -75,15 +75,17 @@ const _monitorProgress = (bb, oncheck = null) => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
let busy = false
|
let busy = false;
|
||||||
const generating = (val) => {
|
const generating = (val) => {
|
||||||
busy = val
|
busy = val;
|
||||||
if (busy) {
|
if (busy) {
|
||||||
window.onbeforeunload = async () => { await sendInterrupt(); };
|
window.onbeforeunload = async () => {
|
||||||
|
await sendInterrupt();
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
window.onbeforeunload = null
|
window.onbeforeunload = null;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts a dream
|
* Starts a dream
|
||||||
|
@ -733,7 +735,7 @@ const _generate = async (endpoint, request, bb, options = {}) => {
|
||||||
mouse.listen.world.btn.middle.onclick.clear(onmorehandler);
|
mouse.listen.world.btn.middle.onclick.clear(onmorehandler);
|
||||||
mouse.listen.world.onwheel.clear(onwheelhandler);
|
mouse.listen.world.onwheel.clear(onwheelhandler);
|
||||||
isDreamComplete = true;
|
isDreamComplete = true;
|
||||||
generating(false)
|
generating(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
redraw();
|
redraw();
|
||||||
|
|
Loading…
Reference in a new issue