Hacking Javascript gamepad support