mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-26 22:56:23 -04:00
Convert Utilities to TypeScript
This commit is contained in:
committed by
Mark McDowall
parent
76650af9fd
commit
d46f4b2154
@@ -0,0 +1,15 @@
|
||||
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');
|
||||
}
|
||||
|
||||
export function isFirefox() {
|
||||
return window.navigator.userAgent.toLowerCase().indexOf('firefox/') >= 0;
|
||||
}
|
||||
Reference in New Issue
Block a user