Codebase list libhttp-browserdetect-perl / 8743d0d
Merge branch 'release/2.0.5-brave' Nicolas Doye 8 years ago
2 changed file(s) with 72 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
7575 webtv browsex silk
7676 applecoremedia galeon seamonkey
7777 epiphany ucbrowser dalvik
78 edge
78 edge brave
7979 );
8080
8181 our @IE_TESTS = qw(
197197 aol => 'AOL Browser',
198198 applecoremedia => 'AppleCoreMedia',
199199 blackberry => 'BlackBerry',
200 brave => 'Brave',
200201 browsex => 'BrowseX',
201202 chrome => 'Chrome',
202203 curl => 'curl',
579580 # $browser_string = 'Maxthon';
580581 #}
581582 }
583 elsif ( index( $ua, "brave" ) != -1 ) {
584
585 # Has to go above Chrome, it includes "like Chrome/"
586
587 $browser = 'brave';
588 $browser_tests->{$browser} = 1;
589 }
582590 elsif ( index( $ua, "silk" ) != -1 ) {
583591
584592 # Has to go above Chrome, it includes "like Chrome/"
15091517 $minor = $2;
15101518 $beta = $3;
15111519 }
1520 elsif ( $browser eq 'brave' ) {
1521
1522 # Note: since 0.7.10, Brave has changed the branding
1523 # of GitHub's "Electron" (http://electron.atom.io/) to "Brave".
1524 # This means the browser string has both "brave/" (the browser)
1525 # and "Brave/" (re-branded Electron) in it.
1526 # The generic section below looks at $self->{browser_string}, which is "Brave"
1527 # (Electron) and not $self->{browser} which is "brave".
1528 # Caveat parser.
1529 if ( $ua =~ m{brave/(\d+)\.(\d+)([\d.]*)} ) {
1530 $major = $1;
1531 $minor = $2;
1532 $beta = $3;
1533 }
1534 }
15121535 elsif ($browser eq 'chrome'
15131536 && $ua =~ m{crios/(\d+)\.(\d+)([\d.]*)} ) {
15141537 $major = $1;
24982521 browsex, dalvik, elinks, links, lynx, emacs, epiphany, galeon,
24992522 konqueror, icab, lotusnotes, mosaic, mozilla, netfront, netscape,
25002523 n3ds, dsi, obigo, realplayer, seamonkey, silk, staroffice, ucbrowser,
2501 webtv
2524 webtv, brave
25022525
25032526 If the browser could not be identified (either because unrecognized
25042527 or because it is a robot), returns C<undef>.
1250412504 "os_string" : "Win7",
1250512505 "robot" : 0
1250612506 },
12507 "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) brave/0.7.10 Chrome/47.0.2526.110 Brave/0.36.5 Safari/537.36" : {
12508 "browser" : "brave",
12509 "browser_beta" : ".10",
12510 "browser_major" : "0",
12511 "browser_minor" : ".7",
12512 "browser_string" : "Brave",
12513 "engine" : "webkit",
12514 "engine_beta" : "",
12515 "engine_major" : "537",
12516 "engine_minor" : ".36",
12517 "engine_string" : "WebKit",
12518 "match" : [
12519 "windows",
12520 "winnt",
12521 "win32",
12522 "win7",
12523 "brave",
12524 "webkit"
12525 ],
12526 "os" : "windows",
12527 "os_string" : "Win7",
12528 "robot" : 0
12529 },
12530 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) brave/0.7.9 Chrome/47.0.2526.73 Electron/0.36.2 Safari/537.36" : {
12531 "browser" : "brave",
12532 "browser_beta" : ".9",
12533 "browser_major" : "0",
12534 "browser_minor" : ".7",
12535 "browser_string" : "Brave",
12536 "engine" : "webkit",
12537 "engine_beta" : "",
12538 "engine_major" : "537",
12539 "engine_minor" : ".36",
12540 "engine_string" : "WebKit",
12541 "match" : [
12542 "mac",
12543 "macosx",
12544 "brave",
12545 "webkit"
12546 ],
12547 "os" : "macosx",
12548 "os_beta" : ".3",
12549 "os_major" : "10",
12550 "os_minor" : ".11",
12551 "os_string" : "Mac OS X",
12552 "robot" : 0
12553 },
1250712554 "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.122 Safari/537.36 OPR/24.0.1558.64" : {
1250812555 "browser" : "opera",
1250912556 "browser_major" : "24",