From e44ca1de6ec1b8f7564b67493e6c14de900be3f7 Mon Sep 17 00:00:00 2001 From: Benoit de La Forest Date: Thu, 27 Oct 2016 17:47:18 +0200 Subject: [PATCH] fix windowsphone flagged as android Closes #167 --- src/bowser.js | 2 +- src/useragents.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bowser.js b/src/bowser.js index d69268f..fcffbcd 100644 --- a/src/bowser.js +++ b/src/bowser.js @@ -321,7 +321,7 @@ } // set OS flags for platforms that have multiple browsers - if (!result.msedge && (android || result.silk)) { + if (!result.windowsphone && !result.msedge && (android || result.silk)) { result.android = t } else if (iosdevice) { result[iosdevice] = t diff --git a/src/useragents.js b/src/useragents.js index e30aea3..b1855dd 100644 --- a/src/useragents.js +++ b/src/useragents.js @@ -936,6 +936,14 @@ module.exports.useragents = { , mobile: true , a: true } + , 'Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; Microsoft; Lumia 535)': { + windowsphone: true + , osversion: '8.1' + , msie: true + , version: '11.0' + , mobile: true + , a: true + } } , WebOS: { 'Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.5; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.83 Safari/534.6 TouchPad/1.0': {