Skip to content

Commit

Permalink
Merge pull request #368 from Deliaz/master
Browse files Browse the repository at this point in the history
Add Coc Coc browser detection
  • Loading branch information
faisalman authored Dec 17, 2020
2 parents 2d53ceb + 26c74ef commit cc2da93
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,10 @@
/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i // Android Browser
], [VERSION, [NAME, 'Android Browser']], [

/(sailfishbrowser)\/([\w\.]+)/i // Sailfish Browser
/(coc_coc_browser)\/([\w\.]+)/i // Coc Coc Browser
], [[NAME, 'Coc Coc'], VERSION], [

/(sailfishbrowser)\/([\w\.]+)/i // Sailfish Browser
], [[NAME, 'Sailfish Browser'], VERSION], [

/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i
Expand Down
10 changes: 10 additions & 0 deletions test/browser-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,16 @@
"major" : "16"
}
},
{
"desc" : "Coc Coc Browser",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) coc_coc_browser/78.0.129 Chrome/72.0.3626.129 Safari/537.36",
"expect" :
{
"name" : "Coc Coc",
"version" : "78.0.129",
"major" : "78"
}
},
{
"desc" : "Dillo",
"ua" : "Dillo/2.2",
Expand Down

0 comments on commit cc2da93

Please sign in to comment.