From d5baaacb727625676d7a3dfd1af504464effc2cb Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 8 Apr 2014 17:35:12 -0400 Subject: [PATCH] utils.isAndroidBrowser --- public/src/utils.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/src/utils.js b/public/src/utils.js index fc4681dc44..15ae1c6e63 100644 --- a/public/src/utils.js +++ b/public/src/utils.js @@ -257,6 +257,12 @@ escapeRegexChars: function(text) { return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + }, + + isAndroidBrowser: function() { + // http://stackoverflow.com/questions/9286355/how-to-detect-only-the-native-android-browser + var nua = navigator.userAgent; + return ((nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1) && !(nua.indexOf('Chrome') > -1)); } };