Skip to content

Commit

Permalink
Fix #697 - Add new browser: Opera GX - https://www.opera.com/gx
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Dec 29, 2023
1 parent 09904a0 commit 0c49d75
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/ua-parser.js
Expand Up @@ -300,6 +300,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/specs/browser-all.json
Expand Up @@ -1138,6 +1138,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 0c49d75

Please sign in to comment.