Skip to content

Instantly share code, notes, and snippets.

@adsl99801
Last active March 14, 2019 03:20
Show Gist options
  • Save adsl99801/e9cd813952f74fc3cfba946389be1146 to your computer and use it in GitHub Desktop.
Save adsl99801/e9cd813952f74fc3cfba946389be1146 to your computer and use it in GitHub Desktop.
in app browser
var u = navigator.userAgent,
ua = navigator.userAgent.toLowerCase(),
isLineApp = u.indexOf("Line") > -1, // Line 內建瀏覽器
isFbApp = u.indexOf("FBAV") > -1, // FB App 內建瀏覽器
isWeixinApp = ua.match(/MicroMessenger/i) == "micromessenger"; // 微信內建瀏覽器
if (isLineApp) {
webShareImp();
}
if (isFbApp) {
webShareImp();
}
if (isWeixinApp) {
webShareImp();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment