diff --git a/src/constants.js b/src/constants.js index 49c90de..144a3da 100644 --- a/src/constants.js +++ b/src/constants.js @@ -20,6 +20,7 @@ export const BROWSER_ALIASES_MAP = { Epiphany: 'epiphany', FacebookExternalHit: 'facebookexternalhit', Firefox: 'firefox', + Freebox: 'freebox', Focus: 'focus', Generic: 'generic', 'Google Search': 'google_search', @@ -95,6 +96,7 @@ export const BROWSER_MAP = { epiphany: 'Epiphany', facebookexternalhit: 'FacebookExternalHit', firefox: 'Firefox', + freebox: 'Freebox', focus: 'Focus', generic: 'Generic', google_search: 'Google Search', diff --git a/src/parser-browsers.js b/src/parser-browsers.js index 546efe8..9643468 100644 --- a/src/parser-browsers.js +++ b/src/parser-browsers.js @@ -1214,6 +1214,23 @@ const browsersList = [ }, }, + /* Freebox */ + { + test: [/freebox/i], + describe(ua) { + const browser = { + name: 'Freebox', + }; + const version = Utils.getFirstMatch(/navigateur web\/(\d+(\.\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + /* Safari */ { test: [/safari|applewebkit/i], diff --git a/test/acceptance/useragentstrings.yml b/test/acceptance/useragentstrings.yml index 841ecb0..b80f3f8 100644 --- a/test/acceptance/useragentstrings.yml +++ b/test/acceptance/useragentstrings.yml @@ -2148,6 +2148,20 @@ engine: name: "WebKit" version: "605.1.15" + Freebox: + - + ua: "Mozilla/5.0 (Freebox; Linux i686) AppleWebKit/538.1 (KHTML, like Gecko) Navigateur web/1.0 Safari/538.1" + spec: + browser: + name: "Freebox" + version: "1.0" + os: + name: "Linux" + platform: + type: "desktop" + engine: + name: "WebKit" + version: "538.1" LibreWolf: - ua: "Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 LibreWolf/124.0.2"