Skip to content

Instantly share code, notes, and snippets.

@linssen
Forked from getify/gist:675496
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linssen/8784962 to your computer and use it in GitHub Desktop.
Save linssen/8784962 to your computer and use it in GitHub Desktop.
Flash detection with JavaScript
var _flash_installed = false;
if (
typeof navigator.plugins !== 'undefined' &&
typeof navigator.plugins['Shockwave Flash'] === 'object'
) { _flash_installed = true; }
try {
if (
typeof navigator.mimeTypes !== 'undefined' &&
(new ActiveXObject('ShockwaveFlash.ShockwaveFlash'))
) { _flash_installed = true; }
} catch (e) {
_flash_installed = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment