Skip to content

Commit 28e6e4c

Browse files
author
Josh Wymer
committed
2.10.0 - identify UC Browser
1 parent 7a40ec5 commit 28e6e4c

File tree

11 files changed

+89
-65
lines changed

11 files changed

+89
-65
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
**2.10.0** (19 Jan 2017)
2+
- Identify UC Browser automatically
3+
14
**2.9.17** (8 Dec 2016)
25
- In-app notifications now fetch pre-sanitized/url-encoded URLs from the Mixpanel API
36

build/mixpanel.amd.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ define(function () { 'use strict';
22

33
var Config = {
44
DEBUG: false,
5-
LIB_VERSION: '2.9.17'
5+
LIB_VERSION: '2.10.0'
66
};
77

88
// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
@@ -1394,6 +1394,8 @@ define(function () { 'use strict';
13941394
return 'Chrome';
13951395
} else if (_.includes(user_agent, 'CriOS')) {
13961396
return 'Chrome iOS';
1397+
} else if (_.includes(user_agent, 'UCWEB') || _.includes(user_agent, 'UCBrowser')) {
1398+
return 'UC Browser';
13971399
} else if (_.includes(user_agent, 'FxiOS')) {
13981400
return 'Firefox iOS';
13991401
} else if (_.includes(vendor, 'Apple')) {
@@ -1428,6 +1430,7 @@ define(function () { 'use strict';
14281430
'Microsoft Edge': /Edge\/(\d+(\.\d+)?)/,
14291431
'Chrome': /Chrome\/(\d+(\.\d+)?)/,
14301432
'Chrome iOS': /CriOS\/(\d+(\.\d+)?)/,
1433+
'UC Browser' : /(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,
14311434
'Safari': /Version\/(\d+(\.\d+)?)/,
14321435
'Mobile Safari': /Version\/(\d+(\.\d+)?)/,
14331436
'Opera': /(Opera|OPR)\/(\d+(\.\d+)?)/,

build/mixpanel.cjs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
var Config = {
44
DEBUG: false,
5-
LIB_VERSION: '2.9.17'
5+
LIB_VERSION: '2.10.0'
66
};
77

88
// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
@@ -1394,6 +1394,8 @@ _.info = {
13941394
return 'Chrome';
13951395
} else if (_.includes(user_agent, 'CriOS')) {
13961396
return 'Chrome iOS';
1397+
} else if (_.includes(user_agent, 'UCWEB') || _.includes(user_agent, 'UCBrowser')) {
1398+
return 'UC Browser';
13971399
} else if (_.includes(user_agent, 'FxiOS')) {
13981400
return 'Firefox iOS';
13991401
} else if (_.includes(vendor, 'Apple')) {
@@ -1428,6 +1430,7 @@ _.info = {
14281430
'Microsoft Edge': /Edge\/(\d+(\.\d+)?)/,
14291431
'Chrome': /Chrome\/(\d+(\.\d+)?)/,
14301432
'Chrome iOS': /CriOS\/(\d+(\.\d+)?)/,
1433+
'UC Browser' : /(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,
14311434
'Safari': /Version\/(\d+(\.\d+)?)/,
14321435
'Mobile Safari': /Version\/(\d+(\.\d+)?)/,
14331436
'Opera': /(Opera|OPR)\/(\d+(\.\d+)?)/,

build/mixpanel.globals.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
var Config = {
55
DEBUG: false,
6-
LIB_VERSION: '2.9.17'
6+
LIB_VERSION: '2.10.0'
77
};
88

99
// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
@@ -1395,6 +1395,8 @@
13951395
return 'Chrome';
13961396
} else if (_.includes(user_agent, 'CriOS')) {
13971397
return 'Chrome iOS';
1398+
} else if (_.includes(user_agent, 'UCWEB') || _.includes(user_agent, 'UCBrowser')) {
1399+
return 'UC Browser';
13981400
} else if (_.includes(user_agent, 'FxiOS')) {
13991401
return 'Firefox iOS';
14001402
} else if (_.includes(vendor, 'Apple')) {
@@ -1429,6 +1431,7 @@
14291431
'Microsoft Edge': /Edge\/(\d+(\.\d+)?)/,
14301432
'Chrome': /Chrome\/(\d+(\.\d+)?)/,
14311433
'Chrome iOS': /CriOS\/(\d+(\.\d+)?)/,
1434+
'UC Browser' : /(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,
14321435
'Safari': /Version\/(\d+(\.\d+)?)/,
14331436
'Mobile Safari': /Version\/(\d+(\.\d+)?)/,
14341437
'Opera': /(Opera|OPR)\/(\d+(\.\d+)?)/,

build/mixpanel.umd.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
var Config = {
88
DEBUG: false,
9-
LIB_VERSION: '2.9.17'
9+
LIB_VERSION: '2.10.0'
1010
};
1111

1212
// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
@@ -1398,6 +1398,8 @@
13981398
return 'Chrome';
13991399
} else if (_.includes(user_agent, 'CriOS')) {
14001400
return 'Chrome iOS';
1401+
} else if (_.includes(user_agent, 'UCWEB') || _.includes(user_agent, 'UCBrowser')) {
1402+
return 'UC Browser';
14011403
} else if (_.includes(user_agent, 'FxiOS')) {
14021404
return 'Firefox iOS';
14031405
} else if (_.includes(vendor, 'Apple')) {
@@ -1432,6 +1434,7 @@
14321434
'Microsoft Edge': /Edge\/(\d+(\.\d+)?)/,
14331435
'Chrome': /Chrome\/(\d+(\.\d+)?)/,
14341436
'Chrome iOS': /CriOS\/(\d+(\.\d+)?)/,
1437+
'UC Browser' : /(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,
14351438
'Safari': /Version\/(\d+(\.\d+)?)/,
14361439
'Mobile Safari': /Version\/(\d+(\.\d+)?)/,
14371440
'Opera': /(Opera|OPR)\/(\d+(\.\d+)?)/,

examples/commonjs-browserify/bundle.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
var Config = {
55
DEBUG: false,
6-
LIB_VERSION: '2.9.17'
6+
LIB_VERSION: '2.10.0'
77
};
88

99
// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
@@ -1395,6 +1395,8 @@ _.info = {
13951395
return 'Chrome';
13961396
} else if (_.includes(user_agent, 'CriOS')) {
13971397
return 'Chrome iOS';
1398+
} else if (_.includes(user_agent, 'UCWEB') || _.includes(user_agent, 'UCBrowser')) {
1399+
return 'UC Browser';
13981400
} else if (_.includes(user_agent, 'FxiOS')) {
13991401
return 'Firefox iOS';
14001402
} else if (_.includes(vendor, 'Apple')) {
@@ -1429,6 +1431,7 @@ _.info = {
14291431
'Microsoft Edge': /Edge\/(\d+(\.\d+)?)/,
14301432
'Chrome': /Chrome\/(\d+(\.\d+)?)/,
14311433
'Chrome iOS': /CriOS\/(\d+(\.\d+)?)/,
1434+
'UC Browser' : /(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,
14321435
'Safari': /Version\/(\d+(\.\d+)?)/,
14331436
'Mobile Safari': /Version\/(\d+(\.\d+)?)/,
14341437
'Opera': /(Opera|OPR)\/(\d+(\.\d+)?)/,

examples/es2015-babelify/bundle.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ Object.defineProperty(exports, '__esModule', {
574574
});
575575
var Config = {
576576
DEBUG: false,
577-
LIB_VERSION: '2.9.17'
577+
LIB_VERSION: '2.10.0'
578578
};
579579

580580
exports['default'] = Config;
@@ -5414,6 +5414,8 @@ _.info = {
54145414
return 'Chrome';
54155415
} else if (_.includes(user_agent, 'CriOS')) {
54165416
return 'Chrome iOS';
5417+
} else if (_.includes(user_agent, 'UCWEB') || _.includes(user_agent, 'UCBrowser')) {
5418+
return 'UC Browser';
54175419
} else if (_.includes(user_agent, 'FxiOS')) {
54185420
return 'Firefox iOS';
54195421
} else if (_.includes(vendor, 'Apple')) {
@@ -5448,6 +5450,7 @@ _.info = {
54485450
'Microsoft Edge': /Edge\/(\d+(\.\d+)?)/,
54495451
'Chrome': /Chrome\/(\d+(\.\d+)?)/,
54505452
'Chrome iOS': /CriOS\/(\d+(\.\d+)?)/,
5453+
'UC Browser': /(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,
54515454
'Safari': /Version\/(\d+(\.\d+)?)/,
54525455
'Mobile Safari': /Version\/(\d+(\.\d+)?)/,
54535456
'Opera': /(Opera|OPR)\/(\d+(\.\d+)?)/,

examples/umd-webpack/bundle.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
var Config = {
7171
DEBUG: false,
72-
LIB_VERSION: '2.9.17'
72+
LIB_VERSION: '2.10.0'
7373
};
7474

7575
// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
@@ -1461,6 +1461,8 @@
14611461
return 'Chrome';
14621462
} else if (_.includes(user_agent, 'CriOS')) {
14631463
return 'Chrome iOS';
1464+
} else if (_.includes(user_agent, 'UCWEB') || _.includes(user_agent, 'UCBrowser')) {
1465+
return 'UC Browser';
14641466
} else if (_.includes(user_agent, 'FxiOS')) {
14651467
return 'Firefox iOS';
14661468
} else if (_.includes(vendor, 'Apple')) {
@@ -1495,6 +1497,7 @@
14951497
'Microsoft Edge': /Edge\/(\d+(\.\d+)?)/,
14961498
'Chrome': /Chrome\/(\d+(\.\d+)?)/,
14971499
'Chrome iOS': /CriOS\/(\d+(\.\d+)?)/,
1500+
'UC Browser' : /(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,
14981501
'Safari': /Version\/(\d+(\.\d+)?)/,
14991502
'Mobile Safari': /Version\/(\d+(\.\d+)?)/,
15001503
'Opera': /(Opera|OPR)\/(\d+(\.\d+)?)/,

0 commit comments

Comments
 (0)