Permalink
Browse files

Fixed Vivaldi reporting as mobile browser.

Added some tablets from users.
1 parent c2c6bd2 commit cdf8f8efaf993bc687e78e4622f5eebd0b8b3bf3 @serbanghita committed Nov 11, 2016
View
Oops, something went wrong.
View
@@ -22,7 +22,7 @@
* README: https://github.com/serbanghita/Mobile-Detect/blob/master/README.md
* HOWTO: https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples
*
- * @version 2.8.23
+ * @version 2.8.24
*/
class Mobile_Detect
@@ -66,7 +66,7 @@ class Mobile_Detect
/**
* Stores the version number of the current release.
*/
- const VERSION = '2.8.23';
+ const VERSION = '2.8.24';
/**
* A type for the version() method indicating a string return value.
@@ -460,6 +460,8 @@ class Mobile_Detect
'PocketBookTablet' => 'Pocketbook',
// http://www.kocaso.com/product_tablet.html
'KocasoTablet' => '\b(TB-1207)\b',
+ // http://global.hisense.com/product/asia/tablet/Sero7/201412/t20141215_91832.htm
+ 'HisenseTablet' => '\b(F5281|E2371)\b',
// http://www.tesco.com/direct/hudl/
'Hudl' => 'Hudl HT7S3|Hudl 2',
// http://www.telstra.com.au/home-phone/thub-2/
@@ -509,7 +511,7 @@ class Mobile_Detect
* @var array
*/
protected static $browsers = array(
- 'Vivaldi' => 'Vivaldi',
+ //'Vivaldi' => 'Vivaldi',
// @reference: https://developers.google.com/chrome/mobile/docs/user-agent
'Chrome' => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?',
'Dolfin' => '\bDolfin\b',
@@ -21,5 +21,6 @@
'Mozilla/5.0 (Linux; Android 5.0; PO1MA build/LRX21V) AppelWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.93 Safari/537.36' => array('isMobile' => true, 'isTablet' => true),
'Mozilla/5.0(Linus; Android 4.4.2; K011 Build/KOT49H)AppleWebKit/537.36 (KHTML, like Gecko)Chrome/53.0.2785.124 Safari/537.36' => array('isMobile' => true, 'isTablet' => true),
'Mozilla/5.0 (Linux; Android 5.0.2; K01E Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.93 Safari/537.36' => array('isMobile' => true, 'isTablet' => true),
+ 'Mozilla/5.0 (Linux; Android 5.0.2; P01Z Build/LRX22G; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0' => array('isMobile' => true, 'isTablet' => true),
),
);
@@ -187,7 +187,9 @@
'Mozilla/5.0 (Linux; U; Android 2.3.3; pt-br; X1 Build/HCL ME Tablet X1) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1' => array('isMobile' => true, 'isTablet' => true),
),
-
+ 'Hisense' => array(
+ 'Mozilla/5.0 (Linux; Android 4.4.4; F5281 Build/KTU84Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/260.1985.135 Safari/537.36' => array('isMobile' => true, 'isTablet' => true),
+ ),
'Hudl' => array(
'Mozilla/5.0 (Linux; Android 4.2.2; Hudl HT7S3 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.82 Safari/537.36' => array('isMobile' => true, 'isTablet' => true),
@@ -22,6 +22,8 @@
),
'Other' => array(
+ // Vivaldi Browser
+ 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.148 Safari/537.36 Vivaldi/1.4.589.41' => array('isMobile' => false, 'isTablet' => false),
// Unknown
'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SV1; [eburo v4.0]; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E)' => array('isMobile' => false, 'isTablet' => false),
View
@@ -1,5 +1,5 @@
{
- "hash": "63cdede0e70fdb6de381b63924171043ab4d5c1e",
+ "hash": "904b9b37fec391282d61d739f7c51c228e7efb1a",
"user_agents": [
{
"vendor": "Acer",
@@ -1006,6 +1006,12 @@
"tablet": true
},
{
+ "vendor": "ASUS",
+ "user_agent": "Mozilla\/5.0 (Linux; Android 5.0.2; P01Z Build\/LRX22G; wv) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0",
+ "mobile": true,
+ "tablet": true
+ },
+ {
"vendor": "BlackBerry",
"user_agent": "Mozilla\/5.0 (BlackBerry; U; BlackBerry 9300; en) AppleWebKit\/534.8+ (KHTML, like Gecko) Version\/6.0.0.546 Mobile Safari\/534.8+",
"mobile": true,
@@ -5811,6 +5817,12 @@
"tablet": true
},
{
+ "vendor": "Hisense",
+ "user_agent": "Mozilla\/5.0 (Linux; Android 4.4.4; F5281 Build\/KTU84Q) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/260.1985.135 Safari\/537.36",
+ "mobile": true,
+ "tablet": true
+ },
+ {
"vendor": "Hudl",
"user_agent": "Mozilla\/5.0 (Linux; Android 4.2.2; Hudl HT7S3 Build\/JDQ39) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/30.0.1599.82 Safari\/537.36",
"mobile": true,
@@ -8140,6 +8152,12 @@
},
{
"vendor": "Other",
+ "user_agent": "Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/53.0.2785.148 Safari\/537.36 Vivaldi\/1.4.589.41",
+ "mobile": false,
+ "tablet": false
+ },
+ {
+ "vendor": "Other",
"user_agent": "Mozilla\/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident\/4.0; SV1; [eburo v4.0]; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E)",
"mobile": false,
"tablet": false

0 comments on commit cdf8f8e

Please sign in to comment.