diff options
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/utils.jsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 7591c138f..2312fe225 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -124,8 +124,10 @@ module.exports.notifyMe = function(title, body, channel) { } module.exports.ding = function() { - var audio = new Audio('/static/images/ding.mp3'); - audio.play(); + if (!module.exports.isBrowserFirefox()) { + var audio = new Audio('/static/images/ding.mp3'); + audio.play(); + } } module.exports.getUrlParameter = function(sParam) { @@ -945,3 +947,7 @@ module.exports.generateId = function() { return id; }; + +module.exports.isBrowserFirefox = function() { + return navigator && navigator.userAgent && navigator.userAgent.toLowerCase().indexOf('firefox') > -1; +} |