From 47413d2a30f31d977529610f4ec8f5567d004fde Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Sat, 8 Feb 2014 08:47:33 -0500 Subject: more stuff --- www/js/html5ks.js | 7 ------- www/js/lib/spin.js | 1 + www/js/menu.js | 22 ++++++++++++++-------- 3 files changed, 15 insertions(+), 15 deletions(-) create mode 120000 www/js/lib/spin.js (limited to 'www/js') diff --git a/www/js/html5ks.js b/www/js/html5ks.js index 2e093e1..338ea9b 100644 --- a/www/js/html5ks.js +++ b/www/js/html5ks.js @@ -168,13 +168,6 @@ window.html5ks = { this.menu.init(); }, start: function () { - this.fetch("json", "script").then(function (d) { - for (var k in d) { - if (k.slice(0, 3) === (html5ks.persistent.language === "en" ? "fr_" : "en_")) { - delete d[k]; - } - } - }, console.error); html5ks.api.movie_cutscene("4ls", true).then(function () { html5ks.menu.mainMenu(); }, console.error); diff --git a/www/js/lib/spin.js b/www/js/lib/spin.js new file mode 120000 index 0000000..e381b49 --- /dev/null +++ b/www/js/lib/spin.js @@ -0,0 +1 @@ +../../../spin.js/ \ No newline at end of file diff --git a/www/js/menu.js b/www/js/menu.js index bcbb039..00d40b7 100644 --- a/www/js/menu.js +++ b/www/js/menu.js @@ -164,14 +164,20 @@ this.initOptions(); 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), console.error); - }.bind(this), false); - start.classList.remove("disabled"); - }.bind(this), console.error); + html5ks.fetch("json", "script").then(function (d) { + for (var k in d) { + if (k.slice(0, 3) === (html5ks.persistent.language === "en" ? "fr_" : "en_")) { + delete d[k]; + } + } + }, console.error)]).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), console.error); + }.bind(this), false); + start.classList.remove("disabled"); + }.bind(this), console.error); }, _state: null, -- cgit v1.2.3-70-g09d2