-
-
Save pokka/40d13863bed948b7739d38f8197f4e14 to your computer and use it in GitHub Desktop.
JavaScript 判断是否微信内置浏览器
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
// 使用 userAgent 判断是否微信内置浏览器 | |
if( navigator.userAgent.toLowerCase().indexOf('micromessenger') > -1 || typeof navgator.wxuserAgent !== "undefined" ) { | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment