FND
2010-01-04 03:04:33 -0800 (Mon, 04 Jan 2010)
193
improved detection for Gecko-based browsers
cf.
https://developer.mozilla.org/en/Browser_Detection_and_Cross_Browser_Support
http://code.google.com/p/doctype/wiki/ArticleUserAgent
ticket #916
---------------
U Trunk/core/js/Config.js
---------------
Modified: Trunk/core/js/Config.js
===================================================================
--- Trunk/core/js/Config.js 2010-01-04 10:28:23 UTC (rev 11369)
+++ Trunk/core/js/Config.js 2010-01-04 11:04:33 UTC (rev 11370)
@@ -151,7 +151,7 @@
config.userAgent = navigator.userAgent.toLowerCase();
config.browser = {
isIE: config.userAgent.indexOf("msie") != -1 && config.userAgent.indexOf("opera") == -1,
- isGecko: config.userAgent.indexOf("gecko") != -1,
+ isGecko: navigator.product == "Gecko" && config.userAgent.indexOf("WebKit") == -1,
ieVersion: /MSIE (\d.\d)/i.exec(config.userAgent), // config.browser.ieVersion[1], if it exists, will be the IE version string, eg "6.0"
isSafari: config.userAgent.indexOf("applewebkit") != -1,
isBadSafari: !((new RegExp("[\u0150\u0170]","g")).test("\u0150")),