1
0
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:
Fuad Laguda
2026-10-27 10:11:36 +00:00
committed by GitHub
parent 8bfe94c9a0
commit ac528fad4c
2 changed files with 18 additions and 1 deletions

View File

@@ -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;

View File

@@ -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: