Skip to content

Instantly share code, notes, and snippets.

@ozh
Created June 13, 2013 14:56
Show Gist options
  • Save ozh/5774354 to your computer and use it in GitHub Desktop.
Save ozh/5774354 to your computer and use it in GitHub Desktop.
javascript check if flash supported
function is_flash_enabled() {
var hasFlash = false;
try {
var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
if( fo ) hasFlash = true;
} catch(e) {
if( navigator.mimeTypes ["application/x-shockwave-flash"] != undefined )
hasFlash = true;
}
return hasFlash;
}
// todo: check with Chrome & FF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment