summaryrefslogtreecommitdiffstats
path: root/web/react/utils/utils.jsx
diff options
context:
space:
mode:
authornickago <ngonella@calpoly.edu>2015-08-17 08:10:49 -0700
committernickago <ngonella@calpoly.edu>2015-08-17 08:10:49 -0700
commitfb9e891246db3b8b69e70697d29be5b36b8c7578 (patch)
treec1a7709f539bd7f1974a68fbfec5c264bce032df /web/react/utils/utils.jsx
parent63005366ade33e0c1509fc1517381279b6cbd9ee (diff)
downloadchat-fb9e891246db3b8b69e70697d29be5b36b8c7578.tar.gz
chat-fb9e891246db3b8b69e70697d29be5b36b8c7578.tar.bz2
chat-fb9e891246db3b8b69e70697d29be5b36b8c7578.zip
Added hardcoded firefox function
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r--web/react/utils/utils.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index ba48f0b1b..bc1009135 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -124,7 +124,7 @@ module.exports.notifyMe = function(title, body, channel) {
}
module.exports.ding = function() {
- if (!module.exports.checkBrowserType('firefox')) {
+ if (!module.exports.isBrowserFirefox()) {
var audio = new Audio('/static/images/ding.mp3');
audio.play();
}
@@ -937,6 +937,6 @@ module.exports.generateId = function() {
return id;
};
-module.exports.checkBrowserType = function(browser) {
- return navigator && navigator.userAgent && navigator.userAgent.toLowerCase().indexOf(browser.toLowerCase()) > -1
+module.exports.isBrowserFirefox = function() {
+ return navigator && navigator.userAgent && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
}