Last active
December 16, 2015 03:49
-
-
Save danbrianwhite/7d4c0b4be601ed67d30c to your computer and use it in GitHub Desktop.
isFlashEnabled
This file contains 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 isFlashEnabled() | |
{ | |
var hasFlash = false; | |
try | |
{ | |
var flashObject = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); | |
if(flashObject) hasFlash = true; | |
} | |
catch(e) | |
{ | |
if(navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) hasFlash = true; | |
} | |
return hasFlash; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment