summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-05-28 15:19:43 +0200
committerAleksander Machniak <alec@alec.pl>2012-05-28 15:19:43 +0200
commitb9854b8cbecb21ada9ba4f25090d53f520ac6e9e (patch)
tree76c01c1b8fea47e47dda687e1f2ae5d93da40e50 /program/js
parent7c1231a94b2a3dddd74b17c7c66bc9d41bb55f47 (diff)
Add Flash support detection
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 32ab69f2e..e487a6052 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6384,6 +6384,9 @@ function rcube_webmail()
if (this.env.browser_capabilities.pdf === undefined)
this.env.browser_capabilities.pdf = this.pdf_support_check();
+ if (this.env.browser_capabilities.flash === undefined)
+ this.env.browser_capabilities.flash = this.flash_support_check();
+
if (this.env.browser_capabilities.tif === undefined)
this.tif_support_check();
};
@@ -6447,6 +6450,24 @@ function rcube_webmail()
return 0;
};
+ this.flash_support_check = function()
+ {
+ var plugin = navigator.mimeTypes ? navigator.mimeTypes["application/x-shockwave-flash"] : {};
+
+ if (plugin && plugin.enabledPlugin)
+ return 1;
+
+ if (window.ActiveXObject) {
+ try {
+ if (axObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))
+ return 1;
+ }
+ catch (e) {}
+ }
+
+ return 0;
+ };
+
} // end object rcube_webmail