mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-16 15:11:50 +03:00
Adding Opera Coast support, fixing UCBrowser detection
- pushing UCBrowser up to avoid being caught by Chrome regex - adding regex for Opera Coast (Opera's iOS browser)
This commit is contained in:
@@ -267,6 +267,13 @@
|
||||
/(yabrowser)\/([\w\.]+)/i // Yandex
|
||||
], [[NAME, 'Yandex'], VERSION], [
|
||||
|
||||
/(uc\s?browser)[\/\s]?([\w\.]+)/i,
|
||||
/ucweb.+(ucbrowser)[\/\s]?([\w\.]+)/i,
|
||||
/juc.+(ucweb)[\/\s]?([\w\.]+)/i,
|
||||
/(ucbrowser)\/([\w\.]+)/i
|
||||
// UCBrowser
|
||||
], [[NAME, 'UCBrowser'], VERSION], [
|
||||
|
||||
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
|
||||
], [[NAME, /_/g, ' '], VERSION], [
|
||||
|
||||
@@ -290,18 +297,15 @@
|
||||
// Chrome/OmniWeb/Arora/Tizen/Nokia
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(uc\s?browser)[\/\s]?([\w\.]+)/i,
|
||||
/ucweb.+(ucbrowser)[\/\s]?([\w\.]+)/i,
|
||||
/juc.+(ucweb)[\/\s]?([\w\.]+)/i
|
||||
// UCBrowser
|
||||
], [[NAME, 'UCBrowser'], VERSION], [
|
||||
|
||||
/(dolfin)\/([\w\.]+)/i // Dolphin
|
||||
], [[NAME, 'Dolphin'], VERSION], [
|
||||
|
||||
/((?:android.+)crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS
|
||||
], [[NAME, 'Chrome'], VERSION], [
|
||||
|
||||
/(coast)\/([\w\.]+)/i // Opera Coast
|
||||
], [[NAME, 'Opera Coast'], VERSION], [
|
||||
|
||||
/;fbav\/([\w\.]+);/i // Facebook App for iOS
|
||||
], [VERSION, [NAME, 'Facebook']], [
|
||||
|
||||
|
||||
Reference in New Issue
Block a user