mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 13:21:20 -08:00
add isSafari util
This commit is contained in:
1 parent
5f5461eeb4
commit
be060e48c4
9 files changed
+37
-14
No files matched your search
@@ -0,0 +1,9 @@
|
||||
export const userAgent = window.navigator.userAgent;
|
||||
|
||||
export function isMobile() {
|
||||
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent);
|
||||
}
|
||||
|
||||
export function isSafari() {
|
||||
return /^((?!chrome|android).)*safari/i.test(userAgent);
|
||||
}
|
||||
@@ -5,3 +5,4 @@ export * from './file';
|
||||
export * from './property';
|
||||
export * from './time';
|
||||
export * from './format';
|
||||
export * from './compatibility';
|
||||
Reference in new issue
Block a user