diff --git a/application/views/home/demo.php b/application/views/home/demo.php index 579b396d..3ba3e038 100644 --- a/application/views/home/demo.php +++ b/application/views/home/demo.php @@ -8,22 +8,6 @@ -
-
-
-
-
-
- -
-
-
- -

Congratulations!


The accuracy of your watch is

diff --git a/assets/js/home.logic.js b/assets/js/home.logic.js index 2662f533..a4d7d2f2 100644 --- a/assets/js/home.logic.js +++ b/assets/js/home.logic.js @@ -24,57 +24,17 @@ $( document ).ready(function() { }); initSize(); - initDemo(); $('video,audio').mediaelementplayer({ enableAutosize: true, features: [] }); - - + $(".watch-accuracy").html(delta.toFixed(1)); + $("#demo-second-step").show(); }); -var timeoutClick; - -function initDemo(){ - - $("#sync-button").html("" - + "Press this button when
the second-hand

​​" - + '' - + "

" - + "reaches exactly  the twelve
o'clock position

" - ); - - $("#sync-button").show(); - $("#demo-first-step").show(); - $("#demo-second-step").hide(); - - var d = new Date(); - var seconds = d.getSeconds(); - - timeoutClick = setTimeout( - function(){$( "#sync-button" ).click()}, - (60 - seconds+1) * 1000); - - $( "#sync-button" ).click(function() { - - clearInterval(timeoutClick); - - var result = delta; - - $("#demo-first-step").hide(); - $("#demo-second-step").fadeToggle(); - $(".watch-accuracy").html(result.toFixed(1)); - - setTimeout( - function(){initDemo();}, - 10 * 1000); - }); - -} - function initSize(){ var windowHeight = $(window).height();