Commit 97422ed7 authored by Christian Ebert's avatar Christian Ebert
Browse files

api: handle Flash detection in Safari 6 (#167)

Safari 6 reports the installed Flash version even when the plugin is
disabled, thus for instance not triggering expressInstall.
Make sure to return Flash version only when Flash plugin is actually
parent f88c8445
......@@ -88,10 +88,14 @@
getVersion: function() {
var fo, ver;
var fo, ver, plugin;
try {
ver = navigator.plugins["Shockwave Flash"].description.slice(16);
plugin = navigator.plugins["Shockwave Flash"];
// Safari 6 reports version even when disabled
// but [0, 0] should be returned (#167)
if (plugin[0].enabledPlugin != null)
ver = plugin.description.slice(16);
} catch(e) {
try {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment