Skip to content

Commit

Permalink
Backport - Fix #697 - Add new browser: Opera GX - https://www.opera.c…
Browse files Browse the repository at this point in the history
…om/gx

(cherry picked from commit 0c49d75)
  • Loading branch information
faisalman committed May 28, 2024
1 parent d30ad46 commit 5790c0e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@
], [NAME, VERSION], [
/opios[\/ ]+([\w\.]+)/i // Opera mini on iphone >= 8.0
], [VERSION, [NAME, OPERA+' Mini']], [
/\bop(?:rg)?x\/([\w\.]+)/i // Opera GX
], [VERSION, [NAME, OPERA+' GX']], [
/\bopr\/([\w\.]+)/i // Opera Webkit
], [VERSION, [NAME, OPERA]], [

Expand Down
20 changes: 20 additions & 0 deletions test/browser-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,26 @@
"major" : "12"
}
},
{
"desc" : "Opera GX on Android",
"ua" : "Mozilla/5.0 (Linux; Android 10; Redmi Note 8 Pro Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.5790.168 Mobile Safari/537.36 OPX/2",
"expect" :
{
"name" : "Opera GX",
"version" : "2",
"major" : "2"
}
},
{
"desc" : "Opera GX on Windows",
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 OPR/60.0.3255.50747 OPRGX/60.0.3255.50747",
"expect" :
{
"name" : "Opera GX",
"version" : "60.0.3255.50747",
"major" : "60"
}
},
{
"desc" : "Opera Tablet",
"ua" : "Opera/9.80 (Windows NT 6.1; Opera Tablet/15165; U; en) Presto/2.8.149 Version/11.1",
Expand Down

0 comments on commit 5790c0e

Please sign in to comment.