Created
December 9, 2014 10:57
-
-
Save qpre/3712b36d06fcbbf15ca8 to your computer and use it in GitHub Desktop.
Javascript Flash support detection
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
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment