export const isiOS = function ( ) { const u = navigator . userAgent , app = navigator . appVersion ; return ! ! u . match ( /\(i[^;]+;( U;)? CPU.+Mac OS X/ ) ; } ; export const isAndroid = function ( ) { const u = navigator . userAgent , app = navigator . appVersion ; return u . indexOf ( 'Android' ) > - 1 || u . indexOf ( 'Linux' ) > - 1 ; } ; export const isSafari = function ( ) { return /Safari/ . test ( navigator . userAgent ) && ! /Chrome/ . test ( navigator . userAgent ) ; } ; export const isWeChat = function ( ) { var ua = navigator . userAgent . toLowerCase ( ) ; if ( ua . match ( /MicroMessenger/i ) == "micromessenger" ) { return true ; } else { return false ; } } ; export const isiOSWechat = function ( ) { var ua = navigator . userAgent . toLowerCase ( ) ; if ( isWeChat ( ) && isiOS ( ) ) { return true ; } else { return false ; } } ; export const isAndroidWechat = function ( ) { var ua = navigator . userAgent . toLowerCase ( ) ; if ( isWeChat ( ) && isAndroid ( ) ) { return true ; } else { return false ; } } ;