An easy way to get the device pixel ratio of a screen using JavaScript.