diff options
Diffstat (limited to 'www')
-rw-r--r-- | www/js/api.js | 1 | ||||
-rw-r--r-- | www/js/html5ks.js | 26 | ||||
-rw-r--r-- | www/js/menu.js | 2 |
3 files changed, 14 insertions, 15 deletions
diff --git a/www/js/api.js b/www/js/api.js index da45467..d05611e 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -332,7 +332,6 @@ window.html5ks.api = { } if (char.kind === "nvl") { - var deferred = when.defer(); html5ks.elements.nvlsay.innerHTML += "<span class='nvl-block'>" + text + "</span>"; html5ks.elements.nvlctc.style.display = "block"; html5ks.next = function () { diff --git a/www/js/html5ks.js b/www/js/html5ks.js index ab50cea..11cbf78 100644 --- a/www/js/html5ks.js +++ b/www/js/html5ks.js @@ -23,20 +23,20 @@ window.html5ks = { language: "en" }; var loaded = localStorage.persistent ? JSON.parse(localStorage.persistent) : {}; + var defProp = function (v) { + Object.defineProperty(html5ks.persistent, k, { + get: function () { + return v; + }, + set: function (value) { + v = value; + localStorage.persistent = JSON.stringify(html5ks.persistent); + }, + enumerable: true + }); + }; for (var k in defaultPersistent) { - (function () { - var v = typeof loaded[k] === "undefined" ? defaultPersistent[k] : loaded[k]; - Object.defineProperty(html5ks.persistent, k, { - get: function () { - return v; - }, - set: function (value) { - v = value; - localStorage.persistent = JSON.stringify(html5ks.persistent); - }, - enumerable: true - }); - }()); + defProp(typeof loaded[k] === "undefined" ? defaultPersistent[k] : loaded[k]); } }, store: { diff --git a/www/js/menu.js b/www/js/menu.js index b940b30..c7e7a3a 100644 --- a/www/js/menu.js +++ b/www/js/menu.js @@ -193,7 +193,7 @@ }.bind(this)); }, - context: function (show, transitional) { + context: function (show) { switch (show) { case true: this._hadWindow = html5ks.elements.window.style.display !== "none"; |