Created
April 3, 2013 14:41
-
-
Save andr3/5301805 to your computer and use it in GitHub Desktop.
How to detect whether we're dealing with a high density screen in javascript?
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
if ("devicePixelRatio" in window && window.devicePixelRatio>1) { | |
// HD code | |
} else { | |
// SD code | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment