Modernizr-like Flash plugin detection
Place this code at the top of your javascript:
if typeof navigator.plugins isnt "undefined" and
typeof navigator.plugins["Shockwave Flash"] is "object"
$('html').addClass 'flash'
else
$('html').addClass 'no-flash'
It will either add a flash
class to the html tag if the flash plugin is available or a no-flash
otherwise
Written by Cédric Néhémie
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Coffeescript
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#