diff options
author | Asaad Mahmood <Unknowngi@live.com> | 2015-11-03 21:56:18 +0500 |
---|---|---|
committer | Asaad Mahmood <Unknowngi@live.com> | 2015-11-03 21:56:18 +0500 |
commit | 38fd4acebd17775c9adc81f719ffc044e3bf6cde (patch) | |
tree | 88c7820276ae1d3620b33ff2976a5c8d3563bcfd /web/react/utils | |
parent | 6f1857f95bf5746d7774a9f2dd1c3ccbfab8f07b (diff) | |
download | chat-38fd4acebd17775c9adc81f719ffc044e3bf6cde.tar.gz chat-38fd4acebd17775c9adc81f719ffc044e3bf6cde.tar.bz2 chat-38fd4acebd17775c9adc81f719ffc044e3bf6cde.zip |
Adding browser functions in utilis and calling them in settings_sidebar
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/utils.jsx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index cca3c00bf..c82bd1065 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -59,6 +59,20 @@ export function isTestDomain() { return false; } +export function isChrome() { + if (navigator.userAgent.indexOf('Chrome') > -1) { + return true; + } + return false; +} + +export function isSafari() { + if (navigator.userAgent.indexOf('Safari') !== -1 && navigator.userAgent.indexOf('Chrome') === -1) { + return true; + } + return false; +} + export function isInRole(roles, inRole) { var parts = roles.split(' '); for (var i = 0; i < parts.length; i++) { |