summaryrefslogtreecommitdiff
path: root/www/js/api.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/api.js')
-rw-r--r--www/js/api.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/www/js/api.js b/www/js/api.js
index e978301..580de6a 100644
--- a/www/js/api.js
+++ b/www/js/api.js
@@ -171,10 +171,15 @@ window.html5ks.api = {
window: function (action, transition) {
var windw = html5ks.elements.window,
deferred = when.defer();
- if (action === "show") {
- windw.style.display = "block";
- } else {
- windw.style.display = "none";
+ switch (action) {
+ case "show":
+ windw.style.display = "block";
+ break;
+ case "hide":
+ windw.style.display = "none";
+ break;
+ default:
+ return windw.style.display !== "none";
}
deferred.resolve(action);
return deferred.promise;