Created
July 23, 2012 11:24
-
-
Save meritt/3163156 to your computer and use it in GitHub Desktop.
Detect retina screens
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isRetina() { | |
return (('devicePixelRatio' in window && devicePixelRatio > 1) || ('matchMedia' in window && matchMedia("(-moz-device-pixel-ratio:1.0)").matches)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment