Created
May 6, 2015 13:58
-
-
Save tatocaster/ecea056688a23500335a to your computer and use it in GitHub Desktop.
Detect Flash in browsers
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 hasFlash(){ | |
var hasFlash = false; | |
try { | |
hasFlash = Boolean(new ActiveXObject('ShockwaveFlash.ShockwaveFlash')); | |
} catch(exception) { | |
hasFlash = ('undefined' != typeof navigator.mimeTypes['application/x-shockwave-flash']); | |
} | |
return hasFlash; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment