Created
June 13, 2013 14:56
-
-
Save ozh/5774354 to your computer and use it in GitHub Desktop.
javascript check if flash supported
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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