Skip to content

Commit

Permalink
feat(client) detect Phoenix Browser and set default engine Blink
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchezzzhak committed Mar 30, 2022
1 parent 1eb1fcf commit bcbd4aa
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 24 deletions.
15 changes: 13 additions & 2 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3047,8 +3047,8 @@
type: browser
name: Phoenix Browser
version: "6.0"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: "84.0.4147.125"
family: Chrome
-
user_agent: Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.112 Secure/57.0.441.112 Safari/537.36
Expand Down Expand Up @@ -5333,3 +5333,14 @@
family: Chrome
headers:
x-requested-with: com.anc.web.browser
-
user_agent: Mozilla/5.0 (Linux; Android 10; TECNO CD7 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/99.0.4844.73 Mobile Safari/537.36
client:
type: browser
name: Phoenix Browser
version: ""
engine: Blink
engine_version: 99.0.4844.73
family: Chrome
headers:
x-requested-with: com.transsion.phoenix
8 changes: 4 additions & 4 deletions Tests/fixtures/smartphone-22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3853,8 +3853,8 @@
type: browser
name: Phoenix Browser
version: "5.4"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: "84.0.4147.111"
device:
type: smartphone
brand: iTel
Expand Down Expand Up @@ -3925,8 +3925,8 @@
type: browser
name: Phoenix Browser
version: "6.1"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: "86.0.4240.198"
device:
type: smartphone
brand: iTel
Expand Down
4 changes: 2 additions & 2 deletions Tests/fixtures/smartphone-24.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4995,8 +4995,8 @@
type: browser
name: Phoenix Browser
version: "5.4"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: "84.0.4147.89"
device:
type: smartphone
brand: LG
Expand Down
8 changes: 4 additions & 4 deletions Tests/fixtures/smartphone-27.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3873,8 +3873,8 @@
type: browser
name: Phoenix Browser
version: "8.4"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: "70.0.3538.110"
device:
type: smartphone
brand: iTel
Expand Down Expand Up @@ -8690,8 +8690,8 @@
type: browser
name: Phoenix Browser
version: "8.4"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: "94.0.4606.71"
device:
type: smartphone
brand: Tecno Mobile
Expand Down
8 changes: 4 additions & 4 deletions Tests/fixtures/smartphone-28.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2959,8 +2959,8 @@
type: browser
name: Phoenix Browser
version: "8.3"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: "92.0.4515.131"
device:
type: smartphone
brand: Tecno Mobile
Expand Down Expand Up @@ -3265,8 +3265,8 @@
type: browser
name: Phoenix Browser
version: "8.0"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: "87.0.4280.101"
device:
type: smartphone
brand: iTel
Expand Down
16 changes: 8 additions & 8 deletions Tests/fixtures/smartphone-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9313,8 +9313,8 @@
type: browser
name: Phoenix Browser
version: "7.5"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: "90.0.4430.210"
device:
type: smartphone
brand: Tecno Mobile
Expand Down Expand Up @@ -9565,8 +9565,8 @@
type: browser
name: Phoenix Browser
version: "7.5"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: "90.0.4430.91"
device:
type: smartphone
brand: Tecno Mobile
Expand Down Expand Up @@ -9601,8 +9601,8 @@
type: browser
name: Phoenix Browser
version: "7.5"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: "90.0.4430.91"
device:
type: smartphone
brand: Tecno Mobile
Expand Down Expand Up @@ -12910,8 +12910,8 @@
type: browser
name: Phoenix Browser
version: "8.8"
engine: WebKit
engine_version: "537.36"
engine: Blink
engine_version: "87.0.4280.141"
device:
type: smartphone
brand: Gtel
Expand Down
2 changes: 2 additions & 0 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,8 @@
- regex: 'PHX/(?:(\d+[\.\d]+))?'
name: 'Phoenix Browser'
version: '$1'
engine:
default: 'Blink'

# PrivacyWall (https://play.google.com/store/apps/details?id=org.privacywall.browser)
- regex: 'PrivacyWall/(?:(\d+[\.\d]+))?'
Expand Down
1 change: 1 addition & 0 deletions regexes/client/hints/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@
'org.mini.freebrowser': 'CM Mini'
'com.anc.web.browser': 'Comfort Browser'
'fast.explorer.web.browser': 'Fast Explorer'
'com.transsion.phoenix': 'Phoenix Browser'

0 comments on commit bcbd4aa

Please sign in to comment.