From 814cb8f0f68ae84330d5e7144a3bcd9a64656da1 Mon Sep 17 00:00:00 2001 From: chee rabbits Date: Sat, 17 Aug 2013 22:17:13 +0100 Subject: [PATCH] quietly, quietly --- app/index.html | 2 +- app/scripts/ui/pictures.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/index.html b/app/index.html index 9f89265..bff6de3 100644 --- a/app/index.html +++ b/app/index.html @@ -4,7 +4,7 @@ Recently - + diff --git a/app/scripts/ui/pictures.js b/app/scripts/ui/pictures.js index cf47a5f..966f964 100644 --- a/app/scripts/ui/pictures.js +++ b/app/scripts/ui/pictures.js @@ -7,7 +7,7 @@ define([ function slide () { var body = $( "body" ); - var sfw, delay, playing, first; + var sfw, delay, playing, first, timeout; this.after( "initialize", function () { this.on( document, "dataPicture", this.picture ); @@ -18,7 +18,8 @@ define([ this.getStarted = function ( event, data ) { // filth mode - sfw = !event.shiftKey; + //sfw = data.swf; + sfw = true; } this.picture = function ( event, data ) { @@ -37,7 +38,7 @@ define([ } if ( playing ) { - setTimeout(function () { + timeout = setTimeout(function () { fly.trigger( document, "uiNeedsPicture", { sfw: sfw } ); }, delay); } @@ -58,6 +59,7 @@ define([ this.soundOver = function () { playing = false; + window.clearTimeout( timeout ); } } })