summaryrefslogtreecommitdiff
path: root/www/js/menu.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/menu.js')
-rw-r--r--www/js/menu.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/www/js/menu.js b/www/js/menu.js
index 1b826b3..77ae7ee 100644
--- a/www/js/menu.js
+++ b/www/js/menu.js
@@ -184,16 +184,14 @@
this.initEvents();
this.initOptions();
- this.elements.main.start.addEventListener("click", function () {
- if (this._imachine_loaded) {
+ when.all([html5ks.fetch("json", "imachine"),
+ html5ks.fetch("json", "script")]).then(function () {
+ var start = this.elements.main.start;
+ start.addEventListener("click", function () {
this.elements.mainMenu.style.display = "none";
html5ks.imachine.start().then(this.mainMenu.bind(this));
- }
- }.bind(this), false);
- html5ks.fetch("json", "imachine").then(function () {
- var start = this.elements.main.start;
+ }.bind(this), false);
start.className = start.className.replace("disabled", "");
- this._imachine_loaded = true;
}.bind(this));
},