1
0
mirror of https://github.com/lancedikson/bowser synced 2025-12-05 06:02:14 +00:00

Change LibreWolf to standalone browser type

- Reverted Firefox regex changes
- Added LibreWolf as a standalone browser in parser-browsers.js
- Added LibreWolf to BROWSER_ALIASES_MAP and BROWSER_MAP in constants.js
- Created LibreWolf section in useragentstrings.yml with updated test expectations
- LibreWolf is now detected as "LibreWolf" instead of "Firefox"

Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-22 16:38:00 +00:00
parent 2cce86b104
commit 0a44234f84
3 changed files with 21 additions and 3 deletions

View File

@ -26,6 +26,7 @@ export const BROWSER_ALIASES_MAP = {
'Internet Explorer': 'ie',
InternetArchiveCrawler: 'internetarchivecrawler',
'K-Meleon': 'k_meleon',
LibreWolf: 'librewolf',
Maxthon: 'maxthon',
'Meta-ExternalAds': 'meta_externalads',
'Meta-ExternalAgent': 'meta_externalagent',
@ -92,6 +93,7 @@ export const BROWSER_MAP = {
ie: 'Internet Explorer',
internetarchivecrawler: 'InternetArchiveCrawler',
k_meleon: 'K-Meleon',
librewolf: 'LibreWolf',
maxthon: 'Maxthon',
meta_externalads: 'Meta-ExternalAds',
meta_externalagent: 'Meta-ExternalAgent',

View File

@ -893,12 +893,27 @@ const browsersList = [
},
},
{
test: [/firefox|iceweasel|fxios|librewolf/i],
test: [/librewolf/i],
describe(ua) {
const browser = {
name: 'LibreWolf',
};
const version = Utils.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i, ua);
if (version) {
browser.version = version;
}
return browser;
},
},
{
test: [/firefox|iceweasel|fxios/i],
describe(ua) {
const browser = {
name: 'Firefox',
};
const version = Utils.getFirstMatch(/(?:firefox|iceweasel|fxios|librewolf)[\s/](\d+(\.?_?\d+)+)/i, ua);
const version = Utils.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i, ua);
if (version) {
browser.version = version;

View File

@ -1915,11 +1915,12 @@
engine:
name: "WebKit"
version: "605.1.15"
LibreWolf:
-
ua: "Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 LibreWolf/124.0.2"
spec:
browser:
name: "Firefox"
name: "LibreWolf"
version: "124.0.2"
os:
name: "Linux"