summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--www/js/api.js13
2 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index cf8b92f..791d33c 100644
--- a/Makefile
+++ b/Makefile
@@ -110,7 +110,7 @@ clean:
$(RM) $(CVIDEO) $(CAUDIO) $(WEBP) www/favicon.ico
watch:
- while inotifywait -r -e modify,delete,move --exclude="^./.git" --exclude="\.swp$$" .; do \
+ while inotifywait -r -e modify,delete,move --exclude="^\./\.git" --exclude="\.swp$$" .; do \
${MAKE}; \
done
diff --git a/www/js/api.js b/www/js/api.js
index 89ecdd3..8afa4a6 100644
--- a/www/js/api.js
+++ b/www/js/api.js
@@ -21,8 +21,12 @@ window.html5ks.api = new (function () {
this._fading[channel] = setInterval(function () {
// clamp new volume 0-1
audio.volume = Math.min(Math.max(audio.volume + step, 0), 1);
- if (audio.volume === 0 || audio.volume === 1) {
- clearInterval(this._fading);
+ switch (audio.volume) {
+ case 0:
+ audio.pause();
+ // break;
+ case 1:
+ clearInterval(this._fading);
}
}.bind(this), 50);
}
@@ -79,6 +83,8 @@ window.html5ks.api = new (function () {
} else {
throw new Error(e);
}
+ } else {
+ throw new Error(e);
}
};
audio.load();
@@ -383,6 +389,7 @@ window.html5ks.api = new (function () {
},
say: function (chrName, str, extend) {
+ if (extend) debugger;
var deferred = when.defer(),
chr = typeof chrName === "string" ? html5ks.data.characters[chrName] : chrName,
w = /{w=?(\d*\.\d*)?}(.*)/.exec(str);
@@ -426,7 +433,7 @@ window.html5ks.api = new (function () {
}
say = html5ks.elements.say;
- say.innerHTML = "";
+ if (!extend) say.innerHTML = "";
ctc = html5ks.elements.ctc;
}