From b6b2858b0172e54c1b497fae5019a868f8be5934 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 10 Jan 2015 14:20:12 +0100 Subject: Fix checks based on window.ActiveXObject in IE > 10 --- program/js/app.js | 4 ++-- program/js/common.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'program') diff --git a/program/js/app.js b/program/js/app.js index ece521861..826c2ef48 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -8066,7 +8066,7 @@ function rcube_webmail() if (plugin && plugin.enabledPlugin) return 1; - if (window.ActiveXObject) { + if ('ActiveXObject' in window) { try { if (plugin = new ActiveXObject("AcroPDF.PDF")) return 1; @@ -8099,7 +8099,7 @@ function rcube_webmail() if (plugin && plugin.enabledPlugin) return 1; - if (window.ActiveXObject) { + if ('ActiveXObject' in window) { try { if (plugin = new ActiveXObject("ShockwaveFlash.ShockwaveFlash")) return 1; diff --git a/program/js/common.js b/program/js/common.js index 76643068d..2b96a8a30 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -103,7 +103,7 @@ function roundcube_browser() this.xmlhttp_test = function() { var activeX_test = new Function("try{var o=new ActiveXObject('Microsoft.XMLHTTP');return true;}catch(err){return false;}"); - this.xmlhttp = (window.XMLHttpRequest || (window.ActiveXObject && activeX_test())); + this.xmlhttp = window.XMLHttpRequest || (('ActiveXObject' in window) && activeX_test()); return this.xmlhttp; }; -- cgit v1.2.3