1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Add Microsoft Edge cases

This commit is contained in:
Denis Demchenko 2017-12-20 22:34:29 +02:00
parent aec02c2c1b
commit 778fdb6004
2 changed files with 38 additions and 4 deletions

View File

@ -31,6 +31,7 @@ import {
const commonVersionIdentifier = /version\/(\d+(\.?_?\d+)+)/i; const commonVersionIdentifier = /version\/(\d+(\.?_?\d+)+)/i;
const browsersList = [ const browsersList = [
/* Opera < 13.0 */
{ {
test: [/opera/i], test: [/opera/i],
describe(ua) { describe(ua) {
@ -46,6 +47,8 @@ const browsersList = [
return browser; return browser;
} }
}, },
/* Opera > 13.0 */
{ {
test: [/opr|opios/i], test: [/opr|opios/i],
describe(ua) { describe(ua) {
@ -212,12 +215,13 @@ const browsersList = [
} }
}, },
{ {
test: [/chrome.+? edge/i], test: [/edg([ea]|ios)/i],
describe(ua) { describe(ua) {
const browser = { const browser = {
name: 'Microsoft Edge' name: 'Microsoft Edge'
}; };
const version = getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, ua);
const version = getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, ua);
if (version) { if (version) {
browser.version = version; browser.version = version;

View File

@ -1258,8 +1258,38 @@
engine: engine:
name: "Trident" name: "Trident"
version: "7.0" version: "7.0"
Microsoft Edge: Microsoft Edge:
- -
ua: 'Mozilla/5.0 (Linux; Android 8.0; Pixel XL Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.0 Mobile Safari/537.36 EdgA/41.1.35.1'
spec:
browser:
name: "Microsoft Edge"
version: "41.1.35.1"
os:
name: "Android"
version: "8.0"
platform:
type: "mobile"
engine:
name: "EdgeHTML"
version: ""
-
ua: 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Mobile/14F89 Safari/603.2.4 EdgiOS/41.1.35.1'
spec:
browser:
name: "Microsoft Edge"
version: "41.1.35.1"
os:
name: "iOS"
version: "10.3.2"
platform:
type: "mobile"
model: "iPhone"
vendor: "Apple"
engine:
name: "EdgeHTML"
version: ""
-
ua: "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0" ua: "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0"
spec: spec:
browser: browser: