diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2014-04-16 15:17:31 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2014-04-16 15:17:31 -0400 |
commit | e417662dce5cae2e95ef98ee38baa8f53a02b9d5 (patch) | |
tree | dce94fb8524dece7e3fcc677ec0cf908a6ec2a97 /www/js/html5ks.js | |
parent | 6a50d79523cf215001cdd55c74c040bd410775df (diff) | |
download | html5ks-e417662dce5cae2e95ef98ee38baa8f53a02b9d5.tar.xz html5ks-e417662dce5cae2e95ef98ee38baa8f53a02b9d5.zip |
mbleh
Diffstat (limited to 'www/js/html5ks.js')
-rw-r--r-- | www/js/html5ks.js | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/www/js/html5ks.js b/www/js/html5ks.js index 13bd198..4113c1d 100644 --- a/www/js/html5ks.js +++ b/www/js/html5ks.js @@ -143,7 +143,7 @@ window.html5ks = { }, initEvents: function () { window.onresize = html5ks.scale; - this.elements.container.addEventListener("mouseup", function (e) { + this.elements.container.addEventListener("click", function (e) { if (html5ks.store.status === "scene") { switch (e.button) { case 0: @@ -157,39 +157,33 @@ window.html5ks = { e.preventDefault(); }, false); }, - warnUnsupported: function () { + warn: function () { if (!html5ks.persistent.gotit) { var interstitial = document.getElementById("interstitial"); - document.getElementById("gotit").addEventListener("mouseup", function () { - interstitial.style.mozAnimation = "1s dissolveout"; - interstitial.style.webkitAnimation = "1s dissolveout"; - interstitial.style.animation = "1s dissolveout"; - interstitial.style.opacity = 0; + interstitial.style.display = "block"; + document.getElementById("lets-go").addEventListener("click", function () { + interstitial.style.display = "none"; html5ks.persistent.gotit = true; html5ks.start(); }, false); - var warns = document.getElementById("warns").children; + var features = document.getElementById("features").children; if (/MSIE/.test(navigator.userAgent)) { document.getElementById("ie").style.display = "block"; + document.getElementById("missing-features").style.display = "block"; } if (!Modernizr.audio.opus) { document.getElementById("opus").style.display = "block"; - } - for (var i = 0; i < warns.length; i++) { - var warn = warns[i]; - if (window.getComputedStyle(warns[i]).getPropertyValue("display") !== "none") { - warn.style.display = "block"; - return true; - } + document.getElementById("missing-features").style.display = "block"; } } + return !html5ks.persistent.gotit; }, onload: function () { FastClick.attach(document.body); this.initElements(); this.scale(); this.initEvents(); - if (!this.warnUnsupported()) { + if (!this.warn()) { this.start(); } this.i18n.init(); |