Skip to content

Commit

Permalink
Roughs in support for Blink based Edge
Browse files Browse the repository at this point in the history
  • Loading branch information
donatj committed Sep 30, 2019
1 parent d7b8a2a commit 199f22d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/UserAgentParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function parse_user_agent( $u_agent = null ) {
}

preg_match_all('%(?P<browser>Camino|Kindle(\ Fire)?|Firefox|Iceweasel|IceCat|Safari|MSIE|Trident|AppleWebKit|
TizenBrowser|(?:Headless)?Chrome|YaBrowser|Vivaldi|IEMobile|Opera|OPR|Silk|Midori|Edge|CriOS|UCBrowser|Puffin|OculusBrowser|SamsungBrowser|
TizenBrowser|(?:Headless)?Chrome|YaBrowser|Vivaldi|IEMobile|Opera|OPR|Silk|Midori|Edge|Edg|CriOS|UCBrowser|Puffin|OculusBrowser|SamsungBrowser|
Baiduspider|Googlebot|YandexBot|bingbot|Lynx|Version|Wget|curl|
Valve\ Steam\ Tenfoot|
NintendoBrowser|PLAYSTATION\ (\d|Vita)+)
Expand Down Expand Up @@ -142,7 +142,10 @@ function parse_user_agent( $u_agent = null ) {
} elseif( $find('YaBrowser', $key, $browser) ) {
$browser = 'Yandex';
$version = $result['version'][$key];
} elseif( $find(array( 'IEMobile', 'Edge', 'Midori', 'Vivaldi', 'OculusBrowser', 'SamsungBrowser', 'Valve Steam Tenfoot', 'Chrome', 'HeadlessChrome' ), $key, $browser) ) {
} elseif( $find(array( 'Edge', 'Edg' ), $key, $browser) ) {
$browser = 'Edge';
$version = $result['version'][$key];
} elseif( $find(array( 'IEMobile', 'Midori', 'Vivaldi', 'OculusBrowser', 'SamsungBrowser', 'Valve Steam Tenfoot', 'Chrome', 'HeadlessChrome' ), $key, $browser) ) {
$version = $result['version'][$key];
} elseif( $rv_result && $find('Trident', $key) ) {
$browser = 'MSIE';
Expand Down

0 comments on commit 199f22d

Please sign in to comment.