diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-08-03 16:40:58 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-08-03 16:40:58 -0400 |
commit | f1453c8cb16b620b56504be26f74bb162a01110a (patch) | |
tree | 33d1c8135d6d2f445f8cc6ac69516166c8a8d202 /www/js/html5ks.js | |
parent | d47fade7099b96fdabb3a5fd3d6196b9a66ce49e (diff) | |
download | html5ks-f1453c8cb16b620b56504be26f74bb162a01110a.tar.xz html5ks-f1453c8cb16b620b56504be26f74bb162a01110a.zip |
fix jshint errors
Diffstat (limited to 'www/js/html5ks.js')
-rw-r--r-- | www/js/html5ks.js | 26 |
1 files changed, 13 insertions, 13 deletions
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: { |