Changeset 965


Ignore:
Timestamp:
02/04/08 22:06:18 (12 years ago)
Author:
ray
Message:

added proper check for WebKit? version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r962 r965  
    143143*/ 
    144144Xinha.is_webkit  = (Xinha.agt.indexOf("applewebkit") != -1); 
     145Xinha.webkit_version = parseInt(navigator.appVersion.replace(/.*?AppleWebKit\/([\d]).*?/,'$1')); 
     146alert(Xinha.webkit_version); 
    145147/** Browser is Safari 
    146148@type string  
     
    164166Xinha.is_gecko  = (navigator.product == "Gecko"); 
    165167Xinha.is_real_gecko = (navigator.product == "Gecko" && !Xinha.is_webkit); 
     168Xinha.is_ff3 = Xinha.is_real_gecko && parseInt(navigator.productSub) >= 2007121016; 
     169Xinha.is_ff2 = Xinha.is_real_gecko && parseInt(navigator.productSub) < 2007121016; 
     170 
    166171/** File is opened locally opened ("file://" protocol) 
    167172 * @type string 
     
    186191    return false; 
    187192  } 
    188   return Xinha.is_gecko || (Xinha.is_opera && 0 && Xinha.opera_version >= 9.1) || Xinha.ie_version >= 5.5; 
     193  return Xinha.is_real_gecko || (Xinha.is_opera && 0 && Xinha.opera_version >= 9.1) || Xinha.ie_version >= 5.5 || Xinha.webkit_version >= 522; 
    189194}; 
    190195/** Cache result of checking for browser support 
Note: See TracChangeset for help on using the changeset viewer.