Created
October 29, 2015 11:59
-
-
Save jbutko/b0fcc18838745d3d0370 to your computer and use it in GitHub Desktop.
#JS: Check if Flash player is enabled/disabled with #javaScript
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 checkFlashSupport() { | |
var hasFlash = false; | |
try { | |
hasFlash = Boolean(new ActiveXObject('ShockwaveFlash.ShockwaveFlash')); | |
} catch(exception) { | |
hasFlash = ('undefined' != typeof navigator.mimeTypes['application/x-shockwave-flash']); | |
} | |
return hasFlash; | |
} | |
// via From http://stackoverflow.com/questions/998245/how-can-i-detect-if-flash-is-installed-and-if-not-display-a-hidden-div-that-inf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment