javascript:config%20%3D%20%7B%0A%09%27updateInterval%27%20%3A%2033%2C%0A%09%27autoRestart%27%20%3A%20false%2C%0A%09%27restartTimeout%27%20%3A%201000%2C%0A%09%27intergateArduino%27%20%3A%20false%0A%7D%3B%0A%0AlittleDinoLoaded%20%3D%20false%3B%0A%0Afunction%20loadLittleDino()%20%7B%0A%0A%09if(!littleDinoLoaded)%20%7B%0A%09%09runner%20%3D%20Runner.instance_%3B%0A%09%09tRex%20%3D%20runner.tRex%3B%0A%09%09littleDinoLoaded%20%3D%20true%3B%0A%09%09document.getElementById(%27main-message%27).children%5B0%5D.innerHTML%20%2B%3D%20%27%20XD%27%3B%0A%09%7D%0A%0A%09if(!runner.running)%20%7B%0A%09%09lastBlink%20%3D%20%7B%7D%3B%0A%09%09updateIntervalId%20%3D%20setInterval(updateLittleDino%2C%20config.updateInterval)%3B%0A%09%09runner.restart()%3B%09%0A%09%7D%0A%7D%0A%0Afunction%20updateLittleDino()%20%7B%0A%0A%09%2F%2FCheck%20if%20T-Rex%20is%20still%20running%20(not%20dead)%0A%09if(!runner.isRunning())%20%7B%0A%09%09%2F%2FDead%2C%20stop%20calling%20updateLittleDino%0A%09%09clearInterval(updateIntervalId)%3B%0A%0A%09%09if(config.autoRestart)%20%7B%0A%09%09%09%2F%2FRestart%20after%20config.restartTimeout%20milliseconds%0A%09%09%20%09setTimeout(function()%20%7B%0A%09%09%20%09%09loadLittleDino()%3B%0A%09%09%20%09%7D%2C%20config.restartTimeout)%3B%0A%09%09%7D%0A%0A%09%7D%20else%20if(runner.isRunning())%20%7B%0A%0A%09%09%2F%2FCheck%20if%20it%20just%20reached%20another%20100%20score%0A%09%09var%20distance%20%3D%20runner.distanceMeter.getActualDistance(runner.distanceRan)%3B%0A%09%09if%20(distance%20%3E%200%20%26%26%20distance%20%25%20runner.distanceMeter.config.ACHIEVEMENT_DISTANCE%20%3D%3D%200%20%26%26%20config.intergateArduino)%20%7B%0A%09%09%09blinkLED(%27C%27%2C%20500)%3B%0A%09%09%7D%0A%0A%09%09%2F%2FIf%20obstacles%20isn%27t%20created%2C%20do%20nothing.%20This%20happens%20when%20game%20just%20started%0A%09%09if(!runner.horizon.obstacles%20%7C%7C%20runner.horizon.obstacles.length%20%3D%3D%200)%20return%3B%0A%0A%09%09if(!tRex.jumping)%20%7B%0A%09%09%09%2F%2FT-Rex%20is%20running%20on%20the%20ground%0A%0A%09%09%09%2F%2FStart%20checking%20if%20T-Rex%20should%20duck%0A%09%09%09var%20firstObstacle%20%3D%20runner.horizon.obstacles%5B0%5D%3B%20%09%09%0A%0A%09%09%09var%20shouldDuck%20%3D%20firstObstacle.yPos%20%2B%20firstObstacle.typeConfig.height%20%20%3C%20150%20-%2025%3B%0A%0A%09%09%09if((shouldDuck%20%26%26%20!tRex.ducking)%20%7C%7C%20(!shouldDuck%20%26%26%20tRex.ducking))%20%7B%0A%09%09%09%09tRex.setDuck(shouldDuck)%3B%0A%09%09%09%7D%0A%0A%09%09%09%2F%2FBlink%20LED%20if%20T-Rex%20is%20ducking%0A%09%09%09if(shouldDuck%20%26%26%20config.intergateArduino)%20blinkLED(%27B%27%2C%20300)%3B%0A%0A%09%09%09%2F%2FDon%27t%20have%20to%20jump%20if%20T-Rex%20should%20duck%0A%09%09%09if(shouldDuck)%20return%3B%0A%0A%0A%09%09%09%2F%2FStart%20checking%20if%20T-Rex%20should%20jump%0A%09%09%09%2F%2FGet%20obstacle%20first%20that%20is%20at%20right%20side%20of%20T-Rex%0A%09%09%09var%20obstacle%20%3D%20null%0A%09%09%09for(var%20i%20%3D%200%3B%20i%20%3C%20runner.horizon.obstacles.length%3B%20i%2B%2B)%20%7B%0A%09%09%09%09if(runner.horizon.obstacles%5Bi%5D.xPos%20%3E%3D%20tRex.xPos%20%2B%20tRex.config.WIDTH)%20%7B%0A%09%09%09%09%09obstacle%20%3D%20runner.horizon.obstacles%5Bi%5D%3B%0A%09%09%09%09%09break%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%0A%09%09%09if(!obstacle)%20return%3B%0A%09%09%09%0A%09%09%09%2F%2FCheck%20if%20the%20obstacle%20is%20gonna%20touch%20T-Rex%0A%09%09%09if(tRex.yPos%20%3C%20obstacle.yPos%20%2B%20obstacle.typeConfig.height%20%26%26%20%0A%09%09%09%09tRex.config.HEIGHT%20%2B%20tRex.yPos%20%3E%20obstacle.yPos)%20%7B%0A%09%09%09%0A%09%09%09%09var%20jumpFactor%20%3D%20(obstacle.xPos%20%2B%20obstacle.typeConfig.width%20%2B%20obstacle.typeConfig.height)%20%2F%20runner.currentSpeed%3B%0A%0A%09%09%09%20%09if(jumpFactor%20%3C%3D%2030%20%26%26%20!tRex.jumping)%20%7B%0A%0A%09%09%09%20%09%09runner.playSound(runner.soundFx.BUTTON_PRESS)%3B%0A%09%09%09%20%09%09runner.tRex.startJump(runner.currentSpeed)%3B%0A%0A%09%09%09%20%09%09if(config.intergateArduino)%20blinkLED(%27A%27%2C%20300)%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%0A%09%09%7D%20else%20%7B%0A%09%09%09%2F%2FT-Rex%20is%20jumping%0A%09%09%09%2F%2FIf%20T-Rex%20already%20jumped%20over%20the%20first%20obstacle%2C%20speed%20drop%0A%09%09%09if(runner.horizon.obstacles.length%20%3E%200)%20%7B%0A%09%09%09%09var%20obstacle%20%3D%20runner.horizon.obstacles%5B0%5D%3B%0A%09%09%09%09if(tRex.xPos%20%3E%20obstacle.xPos%20%2B%20obstacle.typeConfig.width%20%26%26%20!tRex.speedDrop)%20%7B%0A%09%09%09%09%09tRex.setSpeedDrop()%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%7D%0A%0Afunction%20blinkLED(led%2C%20time)%20%7B%0A%0A%09var%20currentTimestamp%20%3D%20new%20Date().getTime()%3B%0A%0A%09if(lastBlink%5Bled%5D%20%26%26%20%20currentTimestamp%20-%20lastBlink%5Bled%5D%20%3C%3D%20time)%20return%3B%0A%0A%09lastBlink%5Bled%5D%20%3D%20currentTimestamp%3B%0A%0A%09var%20request%20%3D%20new%20XMLHttpRequest()%3B%0A%09request.open(%27GET%27%2C%20%27http%3A%2F%2F127.0.0.1%3A81%2FblinkLED%3FLED%3D%27%20%2B%20led%20%2B%20%27%26time%3D%27%20%2B%20time)%3B%0A%09request.send()%3B%0A%7D%0A%0A%2F%2FBind%20loadLittleDino%20to%20space%2C%20up%20keydown%20events%0Adocument.addEventListener(%27keydown%27%2C%20function(event)%20%7B%0A%09if(event.keyCode%20%3D%3D%2032%20%7C%7C%20event.keyCode%20%3D%3D%2038)%20%7B%0A%09%09loadLittleDino()%3B%0A%09%7D%0A%7D%2C%20false)%3B%0A%2F%2FBind%20loadLittleDino%20to%20mouse%20click%20events%0Adocument.addEventListener(%27mouseup%27%2C%20function(event)%20%7B%0A%09if(Runner.instance_%20%26%26%20Runner.instance_.isLeftClickOnCanvas(event))%20%7B%0A%09%09loadLittleDino()%3B%0A%09%7D%0A%7D%2C%20false)%3B