Skip to content

Commit

Permalink
Merge pull request #652 from baymer/ISL-1318
Browse files Browse the repository at this point in the history
ISL-1318: i-ua: Windows Phone не определяется как ua.wp
  • Loading branch information
tenorok committed Jul 7, 2015
2 parents 3c65147 + 6589f29 commit f412b21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blocks-common/i-ua/i-ua.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
device = {},
match;

if (match = ua.match(/Android\s+([\d.]+)/)) {
if (match = ua.match(/Windows\sPhone[^\d]*\s([\d.]+)/)) {
platform.wp = match[1];
} else if (match = ua.match(/Android\s+([\d.]+)/)) {
platform.android = match[1];
} else if (ua.match(/\sHTC[\s_].*AppleWebKit/)) {
// фэйковый десктопный UA по умолчанию у некоторых HTC (например, HTC Sensation)
Expand All @@ -50,8 +52,6 @@
device.ipad = true;
} else if (match = ua.match(/Bada\/([\d.]+)/)) {
platform.bada = match[1];
} else if (match = ua.match(/Windows\sPhone[^\d]*\s([\d.]+)/)) {
platform.wp = match[1];
} else if (match = ua.match(/MSIE\s9/)) {
platform.wp = '7.5';
} else {
Expand Down

0 comments on commit f412b21

Please sign in to comment.