1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

Add Electron

This commit is contained in:
Farfurix
2019-12-04 15:55:36 +03:00
parent d95fe87b06
commit 648daa5f9f
3 changed files with 73 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ export const BROWSER_ALIASES_MAP = {
BlackBerry: 'blackberry',
Chrome: 'chrome',
Chromium: 'chromium',
Electron: 'electron',
Epiphany: 'epiphany',
Firefox: 'firefox',
Focus: 'focus',
@@ -48,6 +49,7 @@ export const BROWSER_MAP = {
blackberry: 'BlackBerry',
chrome: 'Chrome',
chromium: 'Chromium',
electron: 'Electron',
epiphany: 'Epiphany',
firefox: 'Firefox',
focus: 'Focus',

View File

@@ -531,6 +531,21 @@ const browsersList = [
return browser;
},
},
{
test: [/electron/i],
describe(ua) {
const browser = {
name: 'Electron',
};
const version = Utils.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i, ua);
if (version) {
browser.version = version;
}
return browser;
},
},
{
test: [/chromium/i],
describe(ua) {