1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,15 +0,0 @@ |
1 |
-import { window } from 'ssr-window'; |
|
2 |
- |
|
3 |
-const Browser = (function Browser() { |
|
4 |
- function isSafari() { |
|
5 |
- const ua = window.navigator.userAgent.toLowerCase(); |
|
6 |
- return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0); |
|
7 |
- } |
|
8 |
- return { |
|
9 |
- isEdge: !!window.navigator.userAgent.match(/Edge/g), |
|
10 |
- isSafari: isSafari(), |
|
11 |
- isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent), |
|
12 |
- }; |
|
13 |
-}()); |
|
14 |
- |
|
15 |
-export default Browser; |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,15 @@ |
1 |
+import { window } from 'ssr-window'; |
|
2 |
+ |
|
3 |
+const Browser = (function Browser() { |
|
4 |
+ function isSafari() { |
|
5 |
+ const ua = window.navigator.userAgent.toLowerCase(); |
|
6 |
+ return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0); |
|
7 |
+ } |
|
8 |
+ return { |
|
9 |
+ isEdge: !!window.navigator.userAgent.match(/Edge/g), |
|
10 |
+ isSafari: isSafari(), |
|
11 |
+ isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent), |
|
12 |
+ }; |
|
13 |
+}()); |
|
14 |
+ |
|
15 |
+export default Browser; |