From 277202172b8821e4e9c3cee731de94b90f55c627 Mon Sep 17 00:00:00 2001 From: Denis Demchenko Date: Mon, 9 May 2016 10:18:11 +0300 Subject: [PATCH] add some browsers from #73 fix #73 --- README.md | 2 ++ src/bowser.js | 14 ++++++++++++++ src/useragents.js | 17 +++++++++++++++++ 3 files changed, 33 insertions(+) diff --git a/README.md b/README.md index 7eaf30b..29defe8 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,8 @@ If detected, one of these flags may be set to true. The rendering engine flag i * `ucbrowser` — [`webkit`] * `qupzilla` — [`webkit`] * `vivaldi` — [`webkit`] + * `sleipnir` — [`blink`] + * `kMeleon` — [`gecko`] For all detected browsers the browser version is set in the `version` field. diff --git a/src/bowser.js b/src/bowser.js index 985dd14..08d9a86 100644 --- a/src/bowser.js +++ b/src/bowser.js @@ -96,6 +96,20 @@ , version: getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i) } } + else if (/sleipnir/i.test(ua)) { + result = { + name: 'Sleipnir' + , sleipnir: t + , version: getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/k-meleon/i.test(ua)) { + result = { + name: 'K-Meleon' + , kMeleon: t + , version: getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i) + } + } else if (windowsphone) { result = { name: 'Windows Phone' diff --git a/src/useragents.js b/src/useragents.js index f1832c9..1d39f2b 100644 --- a/src/useragents.js +++ b/src/useragents.js @@ -1214,5 +1214,22 @@ module.exports.useragents = { , version: '3.7' , x: true } + }, 'Sleipnir': { + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 Sleipnir/6.1.4': { + sleipnir: true + , blink: true + , windows: true + , x: true + , version: '6.1.4' + } + } + , 'K-Meleon': { + 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20140105 Firefox/24.0 K-Meleon/74.0': { + windows: true + , kMeleon: true + , version: '74.0' + , gecko: true + , x: true + } } }