Skip to content

Instantly share code, notes, and snippets.

@minwe
Created September 30, 2014 05:54
Show Gist options
  • Save minwe/e7f6a3055ef44af1b5ee to your computer and use it in GitHub Desktop.
Save minwe/e7f6a3055ef44af1b5ee to your computer and use it in GitHub Desktop.
detect flash support
var hasFlash = false;
try {
var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
if (fo) {
hasFlash = true;
}
} catch (e) {
if (navigator.mimeTypes
&& navigator.mimeTypes['application/x-shockwave-flash'] != undefined
&& navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) {
hasFlash = true;
}
}
@minwe
Copy link
Author

minwe commented Sep 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment