mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
utils.isAndroidBrowser
This commit is contained in:
@@ -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));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user