mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-16 15:11:50 +03:00
Fix #188 distinguish webview from chrome
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
return str.toLowerCase();
|
||||
},
|
||||
major : function (version) {
|
||||
return typeof(version) === STR_TYPE ? version.split(".")[0] : undefined;
|
||||
return typeof(version) === STR_TYPE ? version.replace(/[^\d\.]/g,'').split(".")[0] : undefined;
|
||||
},
|
||||
trim : function (str) {
|
||||
return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
||||
@@ -275,6 +275,9 @@
|
||||
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
|
||||
], [[NAME, /_/g, ' '], VERSION], [
|
||||
|
||||
/\swv\).+(chrome)\/([\w\.]+)/i // Chrome WebView
|
||||
], [NAME, [VERSION, /(.+)/, 'WebView $1']], [
|
||||
|
||||
/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia
|
||||
], [NAME, VERSION], [
|
||||
|
||||
|
||||
Reference in New Issue
Block a user