One issue with your initial code might be that you're entering it on the left-hand side of the IDE? That's a direct connection to the device - if you upload from the right-hand side then the code gets parsed and when external URLs are mentioned they are fetched and uploaded automatically.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
One issue with your initial code might be that you're entering it on the left-hand side of the IDE? That's a direct connection to the device - if you upload from the right-hand side then the code gets parsed and when external URLs are mentioned they are fetched and uploaded automatically.