Skip to content

Commit

Permalink
Detect new browser: Blue Browser (matomo-org#6327)
Browse files Browse the repository at this point in the history
* feat(browser) detect new browser: Blue Browser
feat(browser) detect browser: Surf Browser

* fix(device-fixture) fix browser

* feat(browser) remove detect SurfBrowser for Android (reason:need more information)

Co-authored-by: Tutik Alexsandr <[email protected]>
Co-authored-by: Stefan Giehl <[email protected]>
  • Loading branch information
3 people authored Jul 23, 2020
1 parent dce5407 commit 3d467f2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class Browser extends ClientParserAbstract
'BH' => 'BlackHawk',
'BJ' => 'Bunjalloo',
'BL' => 'B-Line',
'BU' => 'Blue Browser',
'BR' => 'Brave',
'BK' => 'BriskBard',
'BX' => 'BrowseX',
Expand Down
9 changes: 9 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2834,6 +2834,15 @@
version: 4.1.2.133
engine: WebKit
engine_version: "537.36"
-
user_agent: Mozilla/5.0 (Android 8.1.0; Xiaomi Redmi Note 6 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36 BlueBrowser/3.0
client:
type: browser
name: Blue Browser
short_name: BU
version: "3.0"
engine: WebKit
engine_version: "537.36"
-
user_agent: Mozilla/5.0 (Android 8.0.0; SM-J330F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3317.0 YaaniBrowser/4.3.0.153 (Turkcell-TR) Mobile Safari/537.36
client:
Expand Down
6 changes: 6 additions & 0 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1224,6 +1224,12 @@
engine:
default: 'WebKit'

- regex: 'BlueBrowser(?:/(\d+[\.\d]+))?'
name: 'Blue Browser'
version: '$1'
engine:
default: 'WebKit'

# Chrome Webview
- regex: 'Version/.* Chrome(?:/(\d+[\.\d]+))?'
name: 'Chrome Webview'
Expand Down

0 comments on commit 3d467f2

Please sign in to comment.