Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Coc Coc browser detection #368

Merged
merged 2 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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