Skip to content

Instantly share code, notes, and snippets.

@da2x
Created May 30, 2012 16:41
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 da2x/2837517 to your computer and use it in GitHub Desktop.
Save da2x/2837517 to your computer and use it in GitHub Desktop.
Mac App Store system version detection script snippet
/*
Copyright Apple Inc and their friends.
Code snippet reproduced here for education purposes to show show why
Opera for Mac’s user-agent can’t possibly work with this code.
Opera/9.80 (Macintosh; Intel Mac OS X 10.7.4; U; Edition Next; nb) Presto/2.10.289 Version/12.00
*/
its.detect.macAppStoreDetected=function itsDetectMacAppStoreDetected(){return(its.useragent.versionMeetsMinRequirements(its.useragent.macOsVersion(),"10_6_6")||(its.x.isFirefox()&&its.useragent.versionMeetsMinRequirements(its.useragent.macOsVersion(),"10.6")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment