mesh app work. improve script setup
This commit is contained in:
parent
224a7535c6
commit
16fa536605
8 changed files with 286 additions and 86 deletions
|
|
@ -1,10 +1,14 @@
|
|||
// required for license and other grid app dependencies
|
||||
self.gapp = {};
|
||||
self.gapp = self.gapp || {};
|
||||
|
||||
function $(id) {
|
||||
return document.getElementById(id);
|
||||
}
|
||||
|
||||
function $d(id, v) {
|
||||
$(id).style.display = v;
|
||||
}
|
||||
|
||||
function init() {
|
||||
let container = $('container'),
|
||||
moto = self.moto,
|
||||
|
|
@ -28,10 +32,13 @@ function init() {
|
|||
Space.useDefaultKeys(true);
|
||||
|
||||
// hide loading curtain
|
||||
$('curtain').style.display = 'none';
|
||||
$d('curtain','none');
|
||||
|
||||
// remove version cache bust from url
|
||||
window.history.replaceState({},'','/mesh/');
|
||||
|
||||
// start worker
|
||||
moto.client.start(`/code/mesh_work?${gapp.version}`);
|
||||
}
|
||||
|
||||
document.onreadystatechange = function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue