From 38fd4acebd17775c9adc81f719ffc044e3bf6cde Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Tue, 3 Nov 2015 21:56:18 +0500 Subject: Adding browser functions in utilis and calling them in settings_sidebar --- web/react/utils/utils.jsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'web/react/utils') 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++) { -- cgit v1.2.3-1-g7c22