Skip to content

Instantly share code, notes, and snippets.

@isbasex
Last active June 17, 2017 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isbasex/f386c736334ac190b1f73cdf066ba6f5 to your computer and use it in GitHub Desktop.
Save isbasex/f386c736334ac190b1f73cdf066ba6f5 to your computer and use it in GitHub Desktop.
检测是否为 Android 平台国产浏览器
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