mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 16:08:47 +03:00
Improve browser detection: Comodo Dragon
, or simply Dragon
This commit is contained in:
parent
b7c2f541d9
commit
d571859b2e
@ -32,11 +32,11 @@ const Browser = Object.freeze({
|
|||||||
CHROMIUM: 'Chromium',
|
CHROMIUM: 'Chromium',
|
||||||
COBALT: 'Cobalt',
|
COBALT: 'Cobalt',
|
||||||
COC_COC: 'Coc Coc',
|
COC_COC: 'Coc Coc',
|
||||||
COMODO_DRAGON: 'Comodo Dragon',
|
|
||||||
CONKEROR: 'Conkeror',
|
CONKEROR: 'Conkeror',
|
||||||
DILLO: 'Dillo',
|
DILLO: 'Dillo',
|
||||||
DOLPHIN: 'Dolphin',
|
DOLPHIN: 'Dolphin',
|
||||||
DORIS: 'Doris',
|
DORIS: 'Doris',
|
||||||
|
DRAGON: 'Dragon',
|
||||||
DUCKDUCKGO: 'DuckDuckGo',
|
DUCKDUCKGO: 'DuckDuckGo',
|
||||||
EDGE: 'Edge',
|
EDGE: 'Edge',
|
||||||
EPIPHANY: 'Epiphany',
|
EPIPHANY: 'Epiphany',
|
||||||
|
@ -329,8 +329,8 @@
|
|||||||
/(?:ms|\()(ie) ([\w\.]+)/i, // Internet Explorer
|
/(?:ms|\()(ie) ([\w\.]+)/i, // Internet Explorer
|
||||||
|
|
||||||
// Blink/Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
|
// Blink/Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
|
||||||
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,
|
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,
|
||||||
// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio
|
// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon
|
||||||
/(heytap|ovi)browser\/([\d\.]+)/i, // HeyTap/Ovi
|
/(heytap|ovi)browser\/([\d\.]+)/i, // HeyTap/Ovi
|
||||||
/(weibo)__([\d\.]+)/i // Weibo
|
/(weibo)__([\d\.]+)/i // Weibo
|
||||||
], [NAME, VERSION], [
|
], [NAME, VERSION], [
|
||||||
@ -376,8 +376,6 @@
|
|||||||
], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
|
], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
|
||||||
/samsungbrowser\/([\w\.]+)/i // Samsung Internet
|
/samsungbrowser\/([\w\.]+)/i // Samsung Internet
|
||||||
], [VERSION, [NAME, SAMSUNG + ' Internet']], [
|
], [VERSION, [NAME, SAMSUNG + ' Internet']], [
|
||||||
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
|
|
||||||
], [[NAME, /_/g, ' '], VERSION], [
|
|
||||||
/metasr[\/ ]?([\d\.]+)/i // Sogou Explorer
|
/metasr[\/ ]?([\d\.]+)/i // Sogou Explorer
|
||||||
], [VERSION, [NAME, SOGOU + ' Explorer']], [
|
], [VERSION, [NAME, SOGOU + ' Explorer']], [
|
||||||
/(sogou)mo\w+\/([\d\.]+)/i // Sogou Mobile
|
/(sogou)mo\w+\/([\d\.]+)/i // Sogou Mobile
|
||||||
|
@ -406,11 +406,21 @@
|
|||||||
"ua" : "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.7 (KHTML, like Gecko) Comodo_Dragon/16.1.1.0 Chrome/16.0.912.63 Safari/535.7",
|
"ua" : "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.7 (KHTML, like Gecko) Comodo_Dragon/16.1.1.0 Chrome/16.0.912.63 Safari/535.7",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "Comodo Dragon",
|
"name" : "Dragon",
|
||||||
"version" : "16.1.1.0",
|
"version" : "16.1.1.0",
|
||||||
"major" : "16"
|
"major" : "16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Comodo Dragon",
|
||||||
|
"ua" : "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Dragon/98.0.4758.102 Chrome/98.0.4758.102 Safari/537.36",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Dragon",
|
||||||
|
"version" : "98.0.4758.102",
|
||||||
|
"major" : "98"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Conkeror",
|
"desc" : "Conkeror",
|
||||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:6.0.1) Gecko/20110831 conkeror/0.9.3",
|
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:6.0.1) Gecko/20110831 conkeror/0.9.3",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user