| 1 |
function userAgent(pattern) { |
| 2 |
if (typeof window !== 'undefined' && window.navigator) { |
| 3 |
return !!/*@__PURE__*/navigator.userAgent.match(pattern); |
| 4 |
} |
| 5 |
} |
| 6 |
|
| 7 |
export const IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i); |
| 8 |
export const Edge = userAgent(/Edge/i); |
| 9 |
export const FireFox = userAgent(/firefox/i); |
| 10 |
export const Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i); |
| 11 |
export const IOS = userAgent(/iP(ad|od|hone)/i); |
| 12 |
export const ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i); |
| 13 |
|