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
iam4x
94.17K
ericdfields
63.02K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#