Created
November 26, 2015 09:05
-
-
Save cfenzo/cca3a7bebf9a15b20f9e to your computer and use it in GitHub Desktop.
facebook sdk mobile detect
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
// extracted from all.js on nov 26th 2015 | |
var h = navigator.userAgent, | |
i = { | |
iphone: /\b(iPhone|iP[ao]d)/.test(h), | |
ipad: /\b(iP[ao]d)/.test(h), | |
android: /Android/i.test(h), | |
nativeApp: /FBAN\/\w+;/i.test(h), | |
mobile: /Mobile/i.test(h) | |
}; | |
isMobile = i.iphone || i.ipad || i.android || i.mobile; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment