summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-06-27 22:44:08 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2013-06-27 22:44:08 -0400
commit2da330fc5f83ca785951db30165130c1eaed0677 (patch)
tree1277d91097fda12162c030804c48e89d36a8c019 /www/js
parent193426e583dcaf4423a5f29a0f9297b0bf23231c (diff)
downloadhtml5ks-2da330fc5f83ca785951db30165130c1eaed0677.tar.xz
html5ks-2da330fc5f83ca785951db30165130c1eaed0677.zip
no idea what i did, it's probably better now
Diffstat (limited to 'www/js')
-rw-r--r--www/js/html5ks.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/www/js/html5ks.js b/www/js/html5ks.js
index 3291dab..30a0247 100644
--- a/www/js/html5ks.js
+++ b/www/js/html5ks.js
@@ -95,9 +95,6 @@
},
warnUnsupported: function () {
if (!html5ks.persistent.settings.gotit) {
- if (!(/Firefox/.test(navigator.userAgent))) {
- document.getElementById("html-svg-filter").style.display = "block";
- }
var warn = document.getElementById("warn-container");
document.getElementById("gotit").addEventListener("mouseup", function () {
warn.style.mozAnimation = "0.5s dissolveout";
@@ -105,11 +102,19 @@
warn.style.animation = "0.5s dissolveout";
warn.style.opacity = 0;
html5ks.persistent.settings.gotit = true;
+ html5ks.start();
}, false);
var warns = document.getElementById("warns").children;
+ if (/MSIE/.test(navigator.userAgent)) {
+ document.getElementById("ie").style.display = "block";
+ }
+ if (!(/Firefox/.test(navigator.userAgent))) {
+ document.getElementById("html-svg-filter").style.display = "block";
+ }
for (var i = 0; i < warns.length; i++) {
if (window.getComputedStyle(warns[i]).getPropertyValue("display") !== "none") {
warn.style.visibility = "visible";
+ return true;
}
}
}
@@ -119,9 +124,11 @@
this.load();
this.scale();
this.initEvents();
- this.warnUnsupported();
+ if (!this.warnUnsupported()) {
+ this.start();
+ };
},
- winload: function () {
+ start: function () {
this.fetch("script", "a1-monday").then(function () {
html5ks.api.movie_cutscene("4ls").then(function () {
html5ks.menu.mainMenu();
@@ -160,7 +167,4 @@
document.addEventListener("DOMContentLoaded", function () {
html5ks.onload();
}, false);
- window.addEventListener("load", function () {
- html5ks.winload();
- }, false);
}());