diff options
| author | Alon Levy <alon@pobox.com> | 2014-08-10 17:30:30 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-08-10 17:32:56 +0300 |
| commit | c8c4edc2fd30af8ef4b67d56c3c65974ff25e37e (patch) | |
| tree | 5b0a849a29e59062226612c5864cb3fdff7a0a55 /scripts/robot.js | |
| parent | 5420cd2885f42d6d57e601d378069ac1e400db93 (diff) | |
more 'use strict' and fallout handling
Just defining some variables instead of them becoming properties on the global object
Some whitespace fixes too.
Diffstat (limited to 'scripts/robot.js')
| -rw-r--r-- | scripts/robot.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/robot.js b/scripts/robot.js index 71679807..c1631263 100644 --- a/scripts/robot.js +++ b/scripts/robot.js @@ -1,3 +1,5 @@ +"use strict" + var sentence=""; /*sentence+=" #Rhizibot is showing you a #tutorial|"; sentence+="#Rhizi visualizes data with #Graphs and #relationships|"; @@ -43,8 +45,8 @@ setTimeout( Robot, 100 );*/ function Robot(){ - - + + if(counter<=sentence.length){ var text=$('#textanalyser').val(); counter++; @@ -60,7 +62,7 @@ function Robot(){ } }else{ var e = jQuery.Event("keypress"); - e.which = 13; + e.which = 13; e.keyCode = 13; $("#textanalyser").trigger(e); window.setTimeout( Robot, 650/speed ); @@ -68,10 +70,10 @@ function Robot(){ }else{ window.clearInterval(robot); } - - - + + + } |
