Created
June 27, 2014 16:45
-
-
Save fredchu/8ae6865e1750b7dccc24 to your computer and use it in GitHub Desktop.
Check the web page if is added to homescreen (web app mode for iOS Safari)
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 (window.navigator.standalone) { | |
// The app is running in standalone mode. | |
} | |
// or | |
if (window.navigator.standalone && navigator.userAgent.match( /like Mac OS X/i )) { | |
// added to homescreen by mobile Safari | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment