Skip to content

Commit

Permalink
fixed #62, fixed baiduhd browser for ipad.
Browse files Browse the repository at this point in the history
  • Loading branch information
hotoo committed Sep 22, 2014
1 parent 844a37e commit 036d602
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion detector.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ var BROWSER = [
["coolnovo", /\bcoolnovo\/([0-9.]+)/],
["saayaa", "saayaa"],
// 有基于 Chromniun 的急速模式和基于 IE 的兼容模式。必须在 IE 的规则之前。
["baidu", /\bba?idubrowser[ \/]([0-9.x]+)/],
["baidu", /\b(?:ba?idubrowser|baiduhd)[ \/]([0-9.x]+)/],
// 后面会做修复版本号,这里只要能识别是 IE 即可。
["ie", re_msie],
["mi", /\bmiuibrowser\/([0-9.]+)/],
Expand Down
7 changes: 7 additions & 0 deletions tests/detector-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,13 @@ var UAs = [
os: "android/4.4.2",
browser: "uc/9.9.2.467;9.9.2.467;o",
engine: "webkit/533.1;533.1;o"
}],
["Mozilla/5.0 (iPad; CPU OS 7_1_2 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) BaiduHD/2.6.2 Mobile/10A406 Safari/8536.25",
{
device: "ipad/-1",
os: "ios/7.1.2",
browser: "baidu/2.6.2;2.6.2;o",
engine: "webkit/534.46;534.46;o"
}]
];

Expand Down

0 comments on commit 036d602

Please sign in to comment.