summaryrefslogtreecommitdiff
path: root/www/js/html5ks.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/html5ks.js')
-rw-r--r--www/js/html5ks.js26
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();