Last active
June 17, 2017 03:02
-
-
Save isbasex/f386c736334ac190b1f73cdf066ba6f5 to your computer and use it in GitHub Desktop.
检测是否为 Android 平台国产浏览器
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
function isAndroidAndLowBrowser() { | |
var ua = navigator.userAgent.toLowerCase() | |
return [ | |
'qqbrowser', | |
'baidu', | |
'liebao', | |
'micromessenger', | |
'ucbrowser', | |
'360' | |
].some(function(name) { | |
return ua.indexOf('android') !== -1 && ua.indexOf(name.toLowerCase()) !== -1 | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment