Skip to content

Instantly share code, notes, and snippets.

@nathanpitman
Forked from JamesDunne/detect_flash.js
Last active August 29, 2015 14:24
Show Gist options
  • Save nathanpitman/666683dd5b6babb1e496 to your computer and use it in GitHub Desktop.
Save nathanpitman/666683dd5b6babb1e496 to your computer and use it in GitHub Desktop.
// Returns true or false if flash installed or not. Tested with IE8 on Windows 7 and Chrome on Win7 and Mac.
(function() { var ie_flash; try { ie_flash = (window.ActiveXObject && (new ActiveXObject("ShockwaveFlash.ShockwaveFlash")) !== false) } catch(err) { ie_flash = false; } var _flash_installed = ((typeof navigator.plugins != "undefined" && typeof navigator.plugins["Shockwave Flash"] == "object") || ie_flash); return _flash_installed; })()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment