Created
June 16, 2020 05:55
-
-
Save arekbartnik/e9bad975d635659f8b40b4cc8aa94673 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// return true if the Web App is running as PWA (installed) | |
const isPWA = () => ( | |
matchMedia('(display-mode: standalone)').matches || | |
navigator.standalone || | |
document.referrer.includes('android-app://') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment