Skip to content

Instantly share code, notes, and snippets.

@paulredmond
Forked from madrobby/gist:3161015
Created July 23, 2012 04:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulredmond/3161957 to your computer and use it in GitHub Desktop.
Save paulredmond/3161957 to your computer and use it in GitHub Desktop.
detect retina support
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