mirror of
https://github.com/Mibew/design.git
synced 2025-01-22 18:10:33 +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
|
||||
encoding//webim/INSTALL_RUS.txt=cp1251
|
||||
encoding//webim/locales/fr/properties=ISO-8859-1
|
||||
encoding//webim/locales/names/properties=utf-8
|
||||
encoding//webim/locales/ru=cp1251
|
||||
encoding//webim/locales/sp/properties=ISO-8859-1
|
||||
|
@ -202,6 +202,8 @@ function is_ajax_browser($browserid,$ver,$useragent) {
|
||||
return $ver >= 1.4;
|
||||
if( $browserid == "firefox")
|
||||
return $ver >= 1.0;
|
||||
if( $browserid == "chrome")
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -214,7 +216,7 @@ function is_old_browser($browserid,$ver) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$knownAgents = array("opera","msie","safari","firefox","netscape","mozilla");
|
||||
$knownAgents = array("opera","msie","chrome","safari","firefox","netscape","mozilla");
|
||||
|
||||
function get_remote_level($useragent) {
|
||||
global $knownAgents;
|
||||
|
@ -45,7 +45,7 @@ function get_useragent_version($userAgent) {
|
||||
$userAgent = strtolower($userAgent);
|
||||
foreach( $knownAgents as $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];
|
||||
if($agent=='safari') {
|
||||
if(preg_match( "/version\/(\\d+(\\.\\d+(\\.\\d+)?)?)/", $userAgent, $matches)) {
|
||||
|
Loading…
Reference in New Issue
Block a user