From 2da330fc5f83ca785951db30165130c1eaed0677 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Thu, 27 Jun 2013 22:44:08 -0400 Subject: no idea what i did, it's probably better now --- www/js/html5ks.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'www/js') 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); }()); -- cgit v1.2.3-54-g00ecf