diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-06-21 19:11:14 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-06-21 19:11:14 -0400 |
commit | 8d2caf2bb9108b9f4ec66dc7d6608406a43a17d6 (patch) | |
tree | 1e11838c665347d6db5d38e678e7e11dff5b91eb /www/js | |
parent | e7200fa50a7d323885f3e15d3692794ce99543e3 (diff) | |
download | html5ks-8d2caf2bb9108b9f4ec66dc7d6608406a43a17d6.tar.xz html5ks-8d2caf2bb9108b9f4ec66dc7d6608406a43a17d6.zip |
keepin' on workin'
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/html5ks.js | 33 | ||||
-rw-r--r-- | www/js/lib/jquery-2.0.2.min.js (renamed from www/js/jquery-2.0.2.min.js) | 0 | ||||
-rw-r--r-- | www/js/lib/modernizr.custom.71672.js (renamed from www/js/modernizr.custom.71672.js) | 0 | ||||
l--------- | www/js/lib/when | 1 |
4 files changed, 23 insertions, 11 deletions
diff --git a/www/js/html5ks.js b/www/js/html5ks.js index 68cca48..cd3d6e3 100644 --- a/www/js/html5ks.js +++ b/www/js/html5ks.js @@ -181,10 +181,28 @@ window.html5ks = { }; } }, + show: function () { + var deferred = when.defer(); + deferred.resolve(); + return deferred.promise; + }, + hide: function () { + var deferred = when.defer(); + deferred.resolve(); + return deferred.promise; + }, + warnUnsupported: function () { + if (!(/Firefox/.test(navigator.userAgent))) { + document.getElementById("html-svg-filter").style.display = "block"; + } + document.getElementById("gotit").addEventListener("mouseup", function () { + document.getElementById("warn").style.display = "none"; + }, false); + }, onload: function () { this.elements = { container: document.getElementById("container"), - video: document.getElementById("video"), + video: document.getElementById("vid"), audio: { music: new Audio(), ambient: new Audio(), @@ -196,6 +214,8 @@ window.html5ks = { solid: document.getElementById("solid") } }; + this.elements.audio.music.loop = true; + this.elements.audio.ambient.loop = true; this.load(); this.scale(); window.addEventListener("resize", function () { @@ -205,17 +225,8 @@ window.html5ks = { this.elements.container.addEventListener("mouseup", function () { html5ks.next(); }, false); + this.warnUnsupported(); en_NOP1(); - }, - show: function () { - var deferred = when.defer(); - deferred.resolve(); - return deferred.promise; - }, - hide: function () { - var deferred = when.defer(); - deferred.resolve(); - return deferred.promise; } }; document.addEventListener("DOMContentLoaded", function () { diff --git a/www/js/jquery-2.0.2.min.js b/www/js/lib/jquery-2.0.2.min.js index 73e5218..73e5218 100644 --- a/www/js/jquery-2.0.2.min.js +++ b/www/js/lib/jquery-2.0.2.min.js diff --git a/www/js/modernizr.custom.71672.js b/www/js/lib/modernizr.custom.71672.js index cef48ac..cef48ac 100644 --- a/www/js/modernizr.custom.71672.js +++ b/www/js/lib/modernizr.custom.71672.js diff --git a/www/js/lib/when b/www/js/lib/when new file mode 120000 index 0000000..a9f8fe8 --- /dev/null +++ b/www/js/lib/when @@ -0,0 +1 @@ +../../../when
\ No newline at end of file |