Sascha Schulz
2023-10-24 3d21c92def37bc1ce24694126fa35701bf1f5955
1
2
3
4
5
6
7
8
const UA = navigator.userAgent;
 
export const isMobile = /(iphone|ipod|ipad|android)/gi.test( UA ) ||
                        ( navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 ); // iPadOS
 
export const isChrome = /chrome/i.test( UA ) && !/edge/i.test( UA );
 
export const isAndroid = /android/gi.test( UA );