You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
354 B
17 lines
354 B
5 years ago
|
import MobileDetect from 'mobile-detect';
|
||
|
|
||
|
const mobileDetect = new MobileDetect(window.navigator.userAgent);
|
||
|
|
||
|
export function isMobile() {
|
||
|
|
||
|
return mobileDetect.mobile() != null;
|
||
|
}
|
||
|
|
||
|
export function isIOS() {
|
||
|
return mobileDetect.is('iOS');
|
||
|
}
|
||
2 years ago
|
|
||
|
export function isFirefox() {
|
||
|
return window.navigator.userAgent.toLowerCase().indexOf('firefox/') >= 0;
|
||
|
}
|