Skip to content

Commit

Permalink
Add new browser: Cobalt
Browse files Browse the repository at this point in the history
  • Loading branch information
obecerra3 committed Oct 17, 2022
1 parent d11fc47 commit 8d3c2d3
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@
/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser
/(links) \(([\w\.]+)/i // Links
], [NAME, VERSION]
], [NAME, VERSION], [

/(cobalt)\/([\w\.]+)/i // Cobalt
], [NAME, [VERSION, /master.|lts./, ""]]
],

cpu : [[
Expand Down
36 changes: 36 additions & 0 deletions test/browser-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -1591,5 +1591,41 @@
"version" : "15.6,2",
"major" : "15"
}
},
{
"desc" : "Cobalt 23 Master",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) Cobalt/23.master.0.0-devel (unlike Gecko) v8/8.8.278.8-jit gles Starboard/15",
"expect" : {
"name" : "Cobalt",
"version": "23.0.0",
"major" : "23"
}
},
{
"desc" : "Cobalt 23 LTS",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) Cobalt/23.lts.1.0-qa (unlike Gecko) v8/8.8.278.8-jit gles Starboard/15",
"expect" : {
"name" : "Cobalt",
"version": "23.1.0",
"major" : "23"
}
},
{
"desc" : "Cobalt 11",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) Cobalt/11.0-qa (unlike Gecko) Starboard/6",
"expect" : {
"name" : "Cobalt",
"version": "11.0",
"major" : "11"
}
},
{
"desc" : "Cobalt 9",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) Cobalt/9.0-qa (unlike Gecko) Starboard/4",
"expect" : {
"name" : "Cobalt",
"version": "9.0",
"major" : "9"
}
}
]

0 comments on commit 8d3c2d3

Please sign in to comment.