diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2014-04-06 19:32:58 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2014-04-06 19:32:58 -0400 |
commit | 6a50d79523cf215001cdd55c74c040bd410775df (patch) | |
tree | c7926f1c46b5b68f43e675beddad14d85851210f /www/js/api.js | |
parent | cc4e6587df70f79de8fb23fceefce89d91e2a4bb (diff) | |
download | html5ks-6a50d79523cf215001cdd55c74c040bd410775df.tar.xz html5ks-6a50d79523cf215001cdd55c74c040bd410775df.zip |
stuff
Diffstat (limited to 'www/js/api.js')
-rw-r--r-- | www/js/api.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/www/js/api.js b/www/js/api.js index 6b5f177..0043724 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -191,9 +191,9 @@ window.html5ks.api = { iscene: function (target, is_h, is_end) { html5ks.store.status = "scene"; var deferred = when.defer(), - real_target = html5ks.persistent.language + "_" + target, + real_target = html5ks.persistent.language + "_" + target.replace(/"/g, ''), i = 0; - html5ks.fetch('script', html5ks.data.s2s[real_target]).then(function (l) { + html5ks.fetch('script', real_target).then(function run(l) { if (l[i]) { html5ks.api.runInst(l[i++]).then(run, console.error); } else { @@ -214,8 +214,6 @@ window.html5ks.api = { return this[cmd].apply(this, args); } else if (inst.length === 1) { return this.say("name_only", cmd); - } else if (/^[A-Z]/.test(cmd)) { - return this.say(cmd, args[0]); } else { console.error("no such cmd " + cmd); return when.resolve(); |