mirror of
https://github.com/Mibew/tray.git
synced 2025-01-23 02:20:35 +03:00
detect google chrome
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@248 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
78a189e19c
commit
5bc91f0a7d
@ -1,6 +1,7 @@
|
|||||||
#Thu Nov 27 12:24:15 CET 2008
|
#Thu Dec 18 15:36:01 CET 2008
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
encoding//webim/INSTALL_RUS.txt=cp1251
|
encoding//webim/INSTALL_RUS.txt=cp1251
|
||||||
encoding//webim/locales/fr/properties=ISO-8859-1
|
encoding//webim/locales/fr/properties=ISO-8859-1
|
||||||
|
encoding//webim/locales/names/properties=utf-8
|
||||||
encoding//webim/locales/ru=cp1251
|
encoding//webim/locales/ru=cp1251
|
||||||
encoding//webim/locales/sp/properties=ISO-8859-1
|
encoding//webim/locales/sp/properties=ISO-8859-1
|
||||||
|
@ -202,6 +202,8 @@ function is_ajax_browser($browserid,$ver,$useragent) {
|
|||||||
return $ver >= 1.4;
|
return $ver >= 1.4;
|
||||||
if( $browserid == "firefox")
|
if( $browserid == "firefox")
|
||||||
return $ver >= 1.0;
|
return $ver >= 1.0;
|
||||||
|
if( $browserid == "chrome")
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -214,7 +216,7 @@ function is_old_browser($browserid,$ver) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$knownAgents = array("opera","msie","safari","firefox","netscape","mozilla");
|
$knownAgents = array("opera","msie","chrome","safari","firefox","netscape","mozilla");
|
||||||
|
|
||||||
function get_remote_level($useragent) {
|
function get_remote_level($useragent) {
|
||||||
global $knownAgents;
|
global $knownAgents;
|
||||||
|
@ -45,7 +45,7 @@ function get_useragent_version($userAgent) {
|
|||||||
$userAgent = strtolower($userAgent);
|
$userAgent = strtolower($userAgent);
|
||||||
foreach( $knownAgents as $agent ) {
|
foreach( $knownAgents as $agent ) {
|
||||||
if( strstr($userAgent,$agent) ) {
|
if( strstr($userAgent,$agent) ) {
|
||||||
if( preg_match( "/".$agent."[\\s\/]?(\\d+(\\.\\d+(\\.\\d+)?)?)/", $userAgent, $matches ) ) {
|
if( preg_match( "/".$agent."[\\s\/]?(\\d+(\\.\\d+(\\.\\d+(\\.\\d+)?)?)?)/", $userAgent, $matches ) ) {
|
||||||
$ver = $matches[1];
|
$ver = $matches[1];
|
||||||
if($agent=='safari') {
|
if($agent=='safari') {
|
||||||
if(preg_match( "/version\/(\\d+(\\.\\d+(\\.\\d+)?)?)/", $userAgent, $matches)) {
|
if(preg_match( "/version\/(\\d+(\\.\\d+(\\.\\d+)?)?)/", $userAgent, $matches)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user