Automatic canvas size change depending on iPhone or iPad using screen.width in JavaScript