From 92da59290834eb444202dfd10280ef1dba4426fb Mon Sep 17 00:00:00 2001 From: Faisal Salman Date: Sat, 21 Dec 2024 13:07:26 +0700 Subject: [PATCH] Backport - Add new browser: `LibreWolf` https://librewolf.net/ (cherry picked from commit 2223a2b2d4e48e4d209ab508ede2f8b7dd7c6381) --- src/ua-parser.js | 2 +- test/browser-test.json | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/ua-parser.js b/src/ua-parser.js index 1f79445..87ce7f0 100755 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -346,7 +346,7 @@ // Gecko based /(navigator|netscape\d?)\/([-\w\.]+)/i // Netscape ], [[NAME, 'Netscape'], VERSION], [ - /(wolvic)\/([\w\.]+)/i // Wolvic + /(wolvic|librewolf)\/([\w\.]+)/i // Wolvic/LibreWolf ], [NAME, VERSION], [ /mobile vr; rv:([\w\.]+)\).+firefox/i // Firefox Reality ], [VERSION, [NAME, FIREFOX+' Reality']], [ diff --git a/test/browser-test.json b/test/browser-test.json index 6030921..d770dd7 100644 --- a/test/browser-test.json +++ b/test/browser-test.json @@ -1048,6 +1048,26 @@ "major" : "9" } }, + { + "desc" : "LibreWolf", + "ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 LibreWolf/91.0", + "expect" : + { + "name" : "LibreWolf", + "version" : "91.0", + "major" : "91" + } + }, + { + "desc" : "LibreWolf", + "ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0 LibreWolf/97.0.1", + "expect" : + { + "name" : "LibreWolf", + "version" : "97.0.1", + "major" : "97" + } + }, { "desc" : "LINE on Android", "ua" : "Mozilla/5.0 (Linux; Android 5.0; ASUS_Z00AD Build/LRX21V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/51.0.2704.81 Mobile Safari/537.36 Line/6.5.1/IAB",