From cd3ba72b2fe8b72555eac12ff8fea9ad8df1d840 Mon Sep 17 00:00:00 2001 From: Deliaz Date: Mon, 18 Mar 2019 13:17:44 +0700 Subject: [PATCH] Add Coc Coc browser detection --- src/ua-parser.js | 3 +++ test/browser-test.json | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/ua-parser.js b/src/ua-parser.js index d982c4eda..42ccf7402 100755 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -334,6 +334,9 @@ /android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i // Android Browser ], [VERSION, [NAME, 'Android Browser']], [ + /(coc_coc_browser)\/([\w\.]+)/i // Coc Coc Browser + ], [[NAME, 'Coc Coc'], VERSION], [ + /(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia ], [NAME, VERSION], [ diff --git a/test/browser-test.json b/test/browser-test.json index b98db5974..954d2347d 100644 --- a/test/browser-test.json +++ b/test/browser-test.json @@ -199,6 +199,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",