1
0
mirror of https://github.com/lancedikson/bowser synced 2024-09-28 14:20:45 +00:00

galaxy samsung tablet not recognize as tablet

This commit is contained in:
Damien Saillard 2016-02-09 10:20:32 +01:00
parent a93245738f
commit 1fee59d3b8
2 changed files with 15 additions and 2 deletions

View File

@ -39,7 +39,11 @@
, versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i) , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i)
, tablet = /tablet/i.test(ua) , tablet = /tablet/i.test(ua)
, mobile = !tablet && /[^-]mobi/i.test(ua) , mobile = !tablet && /[^-]mobi/i.test(ua)
, result , result;
if (android && !mobile) {
tablet = true;
}
if (/opera|opr/i.test(ua)) { if (/opera|opr/i.test(ua)) {
result = { result = {

View File

@ -7,7 +7,16 @@
*/ */
module.exports.useragents = { module.exports.useragents = {
Chrome: { Chrome: {
'Mozilla/5.0 (Linux; Android 5.1.1; Nexus 9 Build/LMY48T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Safari/537.36': { 'Mozilla/5.0 (Linux; Android 5.0.2; SM-T530 Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Safari/537.36': {
chrome: true
, android: true
, osversion: '5.0.2'
, tablet: true
, version: '47.0'
, webkit: true
, a: true
}
, 'Mozilla/5.0 (Linux; Android 5.1.1; Nexus 9 Build/LMY48T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Safari/537.36': {
chrome: true chrome: true
, android: true , android: true
, osversion: '5.1.1' , osversion: '5.1.1'