Improve browser detection so that non-chrome WebKit will be Safari (was not working in default browser for Android 3.0)

This commit is contained in:
Davide P. Cervone 2012-01-20 13:15:54 -05:00
parent fd0e446a39
commit 14507fb9ff
2 changed files with 3 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -2262,7 +2262,8 @@ MathJax.Hub.Startup = {
isPC: (navigator.platform.substr(0,3) === "Win"),
isMSIE: (window.ActiveXObject != null && window.clipboardData != null),
isFirefox: (window.netscape != null && document.ATTRIBUTE_NODE != null && !window.opera),
isSafari: (navigator.userAgent.match(/ (Apple)?WebKit\//) != null && !window.chrome),
isSafari: (navigator.userAgent.match(/ (Apple)?WebKit\//) != null &&
(!window.chrome || window.chrome.loadTimes == null)),
isChrome: (window.chrome != null && window.chrome.loadTimes != null),
isOpera: (window.opera != null && window.opera.version != null),
isKonqueror: (window.hasOwnProperty && window.hasOwnProperty("konqueror") && navigator.vendor == "KDE"),