Skip to content

Commit

Permalink
Adds detection for Mypal browser (#6240)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan Giehl <stefan@matomo.org>
  • Loading branch information
liviuconcioiu and sgiehl committed Apr 14, 2020
1 parent d1ebffa commit 463d19c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Parser/Client/Browser.php
Expand Up @@ -166,6 +166,7 @@ class Browser extends ClientParserAbstract
'MN' => 'Minimo',
'MT' => 'Mint Browser',
'MX' => 'Maxthon',
'MY' => 'Mypal',
'NB' => 'Nokia Browser',
'NO' => 'Nokia OSS Browser',
'NV' => 'Nokia Ovi Browser',
Expand Down Expand Up @@ -281,7 +282,7 @@ class Browser extends ClientParserAbstract
'Baidu' => array('BD', 'BS'),
'Amiga' => array('AV', 'AW'),
'Chrome' => array('CH', 'BA', 'BR', 'CC', 'CD', 'CM', 'CI', 'CF', 'CN', 'CR', 'CP', 'DD', 'IR', 'RM', 'AO', 'TS', 'VI', 'PT', 'AS', 'TB', 'AD', 'SB', 'WP', 'I3', 'CV', 'WH', 'SZ', 'QW', 'LF', 'KW', '2B', 'CE', 'EC', 'MT', 'MS', 'HA', 'OC', 'MZ', 'BM', 'KN', 'SW', 'M1', 'FA', 'TA', 'AH', 'CL', 'SU', 'EU', 'UB', 'LO', 'VG', 'TV', 'A0', '1B'),
'Firefox' => array('FF', 'FE', 'FM', 'SX', 'FB', 'PX', 'MB', 'EI', 'WF', 'CU', 'TF', 'QM', 'FR', 'I4', 'GZ', 'MO', 'F1', 'BI', 'MN', 'BH', 'TO', 'OS', 'FY'),
'Firefox' => array('FF', 'FE', 'FM', 'SX', 'FB', 'PX', 'MB', 'EI', 'WF', 'CU', 'TF', 'QM', 'FR', 'I4', 'GZ', 'MO', 'F1', 'BI', 'MN', 'BH', 'TO', 'OS', 'MY', 'FY'),
'Internet Explorer' => array('IE', 'IM', 'PS'),
'Konqueror' => array('KO'),
'NetFront' => array('NF'),
Expand Down
9 changes: 9 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Expand Up @@ -2547,6 +2547,15 @@
engine: WebKit
engine_version: 605.1.15
-
user_agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:68.9) Gecko/20100101 Goanna/4.5 Firefox/68.9 Mypal/28.9.0
client:
type: browser
name: Mypal
short_name: MY
version: "28.9.0"
engine: Goanna
engine_version: "4.5"
-
user_agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Atom/6.3.0.4 Safari/537.36
client:
type: browser
Expand Down
7 changes: 7 additions & 0 deletions regexes/client/browsers.yml
Expand Up @@ -485,6 +485,13 @@
engine:
default: '' # multi engine

# Mypal (https://github.com/Feodor2/Mypal)
- regex: 'Mypal(?:/(\d+[\.\d]+))?'
name: 'Mypal'
version: '$1'
engine:
default: 'Goanna'

#Firefox Focus / Firefox Klar
- regex: '(?:Focus|Klar)(?:/(\d+[\.\d]+))?'
name: 'Firefox Focus'
Expand Down

0 comments on commit 463d19c

Please sign in to comment.