summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-08-03 16:40:58 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2013-08-03 16:40:58 -0400
commitf1453c8cb16b620b56504be26f74bb162a01110a (patch)
tree33d1c8135d6d2f445f8cc6ac69516166c8a8d202 /www
parentd47fade7099b96fdabb3a5fd3d6196b9a66ce49e (diff)
downloadhtml5ks-f1453c8cb16b620b56504be26f74bb162a01110a.tar.xz
html5ks-f1453c8cb16b620b56504be26f74bb162a01110a.zip
fix jshint errors
Diffstat (limited to 'www')
-rw-r--r--www/js/api.js1
-rw-r--r--www/js/html5ks.js26
-rw-r--r--www/js/menu.js2
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";