diff options
author | Mario <mario@mariovavti.com> | 2021-08-03 07:12:35 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-08-03 07:12:35 +0000 |
commit | cddc0217724f1a7661014d50e4c940e623a0c2dc (patch) | |
tree | f24595d659adbb7d1e5d2e8e6dcd829b093887bb /library/Sortable/src/BrowserInfo.js | |
parent | 571bae9d1c07bb08270163a314c91c138b42e62f (diff) | |
download | volse-hubzilla-cddc0217724f1a7661014d50e4c940e623a0c2dc.tar.gz volse-hubzilla-cddc0217724f1a7661014d50e4c940e623a0c2dc.tar.bz2 volse-hubzilla-cddc0217724f1a7661014d50e4c940e623a0c2dc.zip |
Apps drag and drop feature
Diffstat (limited to 'library/Sortable/src/BrowserInfo.js')
-rw-r--r-- | library/Sortable/src/BrowserInfo.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/library/Sortable/src/BrowserInfo.js b/library/Sortable/src/BrowserInfo.js new file mode 100644 index 000000000..304a853a2 --- /dev/null +++ b/library/Sortable/src/BrowserInfo.js @@ -0,0 +1,12 @@ +function userAgent(pattern) { + if (typeof window !== 'undefined' && window.navigator) { + return !!/*@__PURE__*/navigator.userAgent.match(pattern); + } +} + +export const IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i); +export const Edge = userAgent(/Edge/i); +export const FireFox = userAgent(/firefox/i); +export const Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i); +export const IOS = userAgent(/iP(ad|od|hone)/i); +export const ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i); |