Created
April 27, 2018 23:31
-
-
Save sconstantinides/a57455b93d999bea7a80a7e540f7b4c1 to your computer and use it in GitHub Desktop.
JavaScript PWA detection
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.matchMedia('(display-mode: standalone)').matches) { | |
// Is installed in standalone display mode | |
} | |
if (window.matchMedia('(display-mode: fullscreen)').matches) { | |
// Is installed in fullscreen display mode | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment