Skip to content

Instantly share code, notes, and snippets.

@JamesDunne
Created July 9, 2014 12:29
Show Gist options
  • Save JamesDunne/174ebedbc9afaf2078a7 to your computer and use it in GitHub Desktop.
Save JamesDunne/174ebedbc9afaf2078a7 to your computer and use it in GitHub Desktop.
Flash plugin detection javascript code; works on IE8 and Chrome
// 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