Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit a595553

Browse files
authored
Dragon Browser Added.
1 parent 9dfffa8 commit a595553

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/BrowserDetector.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class BrowserDetector implements DetectorInterface
3737
'Edge',
3838
'Opera',
3939
'Vivaldi',
40+
'Dragon',
4041
'Galeon',
4142
'NetscapeNavigator9Plus',
4243
'SeaMonkey',
@@ -903,6 +904,27 @@ public static function checkBrowserYandex()
903904

904905
return false;
905906
}
907+
908+
/**
909+
* Determine if the browser is Comodo Dragon / Ice Dragon / Chromodo.
910+
*
911+
* @return bool
912+
*/
913+
public static function checkBrowserDragon()
914+
{
915+
if (stripos(self::$userAgentString, 'Dragon') !== false) {
916+
$aresult = explode('/', stristr(self::$userAgentString, 'Dragon'));
917+
if (isset($aresult[1])) {
918+
$aversion = explode(' ', $aresult[1]);
919+
self::$browser->setVersion($aversion[0]);
920+
}
921+
self::$browser->setName(Browser::DRAGON);
922+
923+
return true;
924+
}
925+
926+
return false;
927+
}
906928

907929
/**
908930
* Determine if the browser is Android.

0 commit comments

Comments
 (0)