MDL-16336: add Chrome to browser identification to display HMTL editor.

This commit is contained in:
Rossiani Wijaya
2010-11-18 08:49:26 +00:00
parent 064f325bce
commit c476a2ecfc
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -2371,6 +2371,7 @@ HTMLArea.is_mac_ie = (HTMLArea.is_ie && HTMLArea.is_mac);
HTMLArea.is_win_ie = (HTMLArea.is_ie && !HTMLArea.is_mac);
HTMLArea.is_gecko = (navigator.product == "Gecko");
HTMLArea.is_safari = (HTMLArea.agt.indexOf("safari") != -1);
HTMLArea.is_webkit = (HTMLArea.agt.indexOf("applewebkit") != -1); // eg: chrome
// variable used to pass the object to the popup editor window.
HTMLArea._object = null;
@@ -2398,6 +2399,9 @@ HTMLArea.cloneObject = function(obj) {
// FIXME!!! this should return false for IE < 5.5
HTMLArea.checkSupportedBrowser = function() {
if (HTMLArea.is_webkit) {
return true;
}
if (HTMLArea.is_gecko) {
if (navigator.productSub < 20021201) {
alert("You need at least Mozilla-1.3 Alpha.\n" +
+2
View File
@@ -6528,6 +6528,8 @@ function can_use_html_editor() {
return 'MSIE';
} else if (check_browser_version('Gecko', 20030516)) {
return 'Gecko';
} else if (check_browser_version('Safari', 531)) {
return 'AppleWebKit';
}
}
return false;