Clean up checking if device is JS enabled