Skip to content

Commit

Permalink
Fix Opera/beta bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
vndroid committed Apr 2, 2019
1 parent ade84c8 commit 4791ac0
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Access_UA.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ private function parseBrowser() {
$this->browserID = '360';
$this->browserName = '360浏览器';
$this->browserVersion = $matches[1];
} elseif (preg_match('#OPR/([a-zA-Z0-9.]+)#i', $this->ua, $matches)) {
$this->browserID = 'Opera';
$this->browserName = 'Opera';
$this->browserVersion = $matches[1];
} elseif (preg_match('#MQQBrowser/([a-zA-Z0-9.]+)#i', $this->ua, $matches)) {
$this->browserID = 'QQBrowser';
$this->browserName = 'QQ浏览器';
Expand Down Expand Up @@ -297,13 +301,6 @@ private function parseBrowser() {
} elseif (preg_match('#Safari/([a-zA-Z0-9.]+)#i', $this->ua, $matches)) {
$this->browserID = $this->browserName = 'Safari';
$this->browserVersion = $matches[1];
} elseif (preg_match('#opera mini#i', $this->ua)) {
preg_match('#Opera/([a-zA-Z0-9.]+)#i', $this->ua, $matches);
$this->browserID = $this->browserName = 'Opera Mini';
$this->browserVersion = $matches[1];
} elseif (preg_match('#Opera.([a-zA-Z0-9.]+)#i', $this->ua, $matches)) {
$this->browserID = $this->browserName = 'Opera';
$this->browserVersion = $matches[1];
} elseif (preg_match('#QQ/([a-zA-Z0-9.]+)#i', $this->ua, $matches)) {
$this->browserID = 'QQ';
$this->browserName = '手机QQ';
Expand Down

0 comments on commit 4791ac0

Please # to comment.