mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
Add Electron
This commit is contained in:
parent
d95fe87b06
commit
648daa5f9f
@ -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',
|
||||
|
@ -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) {
|
||||
|
@ -2908,3 +2908,59 @@
|
||||
engine:
|
||||
name: "WebKit"
|
||||
version: "605.1.15"
|
||||
Electron:
|
||||
-
|
||||
ua: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) my-app/1.0.0 Chrome/78.0.3904.113 Electron/7.1.2 Safari/537.36"
|
||||
spec:
|
||||
browser:
|
||||
name: "Electron"
|
||||
version: "7.1.2"
|
||||
os:
|
||||
name: "Windows"
|
||||
version: "NT 10.0"
|
||||
versionName: "10"
|
||||
platform:
|
||||
type: "desktop"
|
||||
engine:
|
||||
name: "Blink"
|
||||
-
|
||||
ua: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.146 Electron/6.1.5 Safari/537.36"
|
||||
spec:
|
||||
browser:
|
||||
name: "Electron"
|
||||
version: "6.1.5"
|
||||
os:
|
||||
name: "Windows"
|
||||
version: "NT 10.0"
|
||||
versionName: "10"
|
||||
platform:
|
||||
type: "desktop"
|
||||
engine:
|
||||
name: "Blink"
|
||||
-
|
||||
ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.113 Electron/7.1.2 Safari/537.36"
|
||||
spec:
|
||||
browser:
|
||||
name: "Electron"
|
||||
version: "7.1.2"
|
||||
os:
|
||||
name: "macOS"
|
||||
version: "10.15.1"
|
||||
versionName: "Catalina"
|
||||
platform:
|
||||
type: "desktop"
|
||||
vendor: 'Apple'
|
||||
engine:
|
||||
name: "Blink"
|
||||
-
|
||||
ua: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.113 Electron/7.1.2 Safari/537.36"
|
||||
spec:
|
||||
browser:
|
||||
name: "Electron"
|
||||
version: "7.1.2"
|
||||
os:
|
||||
name: "Linux"
|
||||
platform:
|
||||
type: "desktop"
|
||||
engine:
|
||||
name: "Blink"
|
||||
|
Loading…
Reference in New Issue
Block a user