summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-12-23 20:00:34 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2013-12-23 20:00:34 -0500
commit68efde1b5d94cbf0b994f5922fa4fc81d2d3cc95 (patch)
treea7573259979717030b64a9a88ffee85e58b89782
parent11ec06e9d0175116d13231a56b4461ab6bb709df (diff)
downloadhtml5ks-68efde1b5d94cbf0b994f5922fa4fc81d2d3cc95.tar.xz
html5ks-68efde1b5d94cbf0b994f5922fa4fc81d2d3cc95.zip
bind everything in api, fix _next bug
-rw-r--r--www/js/api.js4
-rw-r--r--www/js/html5ks.js3
2 files changed, 4 insertions, 3 deletions
diff --git a/www/js/api.js b/www/js/api.js
index b6fd474..7ae4e38 100644
--- a/www/js/api.js
+++ b/www/js/api.js
@@ -1,5 +1,5 @@
"use strict";
-window.html5ks.api = {
+window.html5ks.api = new (function () { return {
init: function () {
var chrs = html5ks.data.characters;
for (var ch in chrs) {
@@ -477,4 +477,4 @@ window.html5ks.api = {
html5ks.state[type] = status;
document.getElementById(type).style.display = status ? "block" : "none";
}
-};
+};});
diff --git a/www/js/html5ks.js b/www/js/html5ks.js
index 73157bf..4b2b0e8 100644
--- a/www/js/html5ks.js
+++ b/www/js/html5ks.js
@@ -60,8 +60,9 @@ window.html5ks = {
},
state: {},
next: function () {
- html5ks._next();
+ var _next = html5ks._next;
html5ks._next = function () {};
+ _next();
},
initElements: function () {
this.elements = {