Skip to content

Instantly share code, notes, and snippets.

@jbutko
Created October 29, 2015 11:59
Show Gist options
  • Save jbutko/b0fcc18838745d3d0370 to your computer and use it in GitHub Desktop.
Save jbutko/b0fcc18838745d3d0370 to your computer and use it in GitHub Desktop.
#JS: Check if Flash player is enabled/disabled with #javaScript
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