- const UA = navigator.userAgent;
- const testElement = document.createElement( 'div' );
-
- export const isMobile = /(iphone|ipod|ipad|android)/gi.test( UA ) ||
- ( navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 );
-
- export const isChrome = /chrome/i.test( UA ) && !/edge/i.test( UA );
-
- export const isAndroid = /android/gi.test( UA );
-
-
-
-
- export const supportsZoom = 'zoom' in testElement.style && !isMobile &&
- ( isChrome || /Version\/[\d\.]+.*Safari/.test( UA ) );
-
- export const supportsHistoryAPI = typeof window.history.replaceState === 'function' && !/PhantomJS/.test( UA );
|