add JS func to check if gamepad is connected