I was able to make your code work by changing it to D3 (one of the exposed IO), and touching the pin off to ground; so your code is good; but the on-board switch seems bad.
Edit: I changed the edge to "falling" and they now work once per boot...very odd
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.
Try: