mirror of
https://github.com/lancedikson/bowser
synced 2026-11-01 00:16:13 +00:00
fix: fall back to the Chrome/ version for Chromium builds without one
This commit is contained in:
@@ -1117,7 +1117,10 @@ const browsersList = [
|
||||
const browser = {
|
||||
name: 'Chromium',
|
||||
};
|
||||
const version = Utils.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
||||
// Builds such as "Chromium GOST" name Chromium without a version, and carry it in Chrome/ instead
|
||||
const version = Utils.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, ua)
|
||||
|| Utils.getFirstMatch(commonVersionIdentifier, ua)
|
||||
|| Utils.getFirstMatch(/(?:chrome)\/(\d+(\.?_?\d+)+)/i, ua);
|
||||
|
||||
if (version) {
|
||||
browser.version = version;
|
||||
|
||||
@@ -3516,6 +3516,20 @@
|
||||
name: "Gecko"
|
||||
version: "20140105"
|
||||
Chromium:
|
||||
-
|
||||
ua: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4513.0 (Chromium GOST) Safari/537.36"
|
||||
spec:
|
||||
browser:
|
||||
name: "Chromium"
|
||||
version: "92.0.4513.0"
|
||||
os:
|
||||
name: "Windows"
|
||||
version: "NT 10.0"
|
||||
versionName: "10"
|
||||
platform:
|
||||
type: "desktop"
|
||||
engine:
|
||||
name: "Blink"
|
||||
-
|
||||
ua: "Mozilla/5.0 (Linux; Ubuntu 14.04 like Android 4.4) AppleWebKit/537.36 Chromium/35.0.1870.2 Mobile Safari/537.36"
|
||||
spec:
|
||||
|
||||
Reference in New Issue
Block a user