Hey everyone, today I added in something to automatically disable the Flash line graphs if we detect that your browser does not have Flash installed. We think this will be particularly useful for those of you who check Clicky constantly on your iPhone, since it doesn’t support Flash. This way, when you look at Clicky on your iPhone, it will use our old school bar graphs, but then on your normal browser, it will show the line graphs again, without you having to change the preference back and forth manually.
There are a billion flash detection Javascript libraries for download, but they’re all huge because they do a billion things. I just wanted something that detected if Flash is supported at all, or not. So, I cooked up my own script. As usual, MSIE made doing something useful as complicated as possible. What would have taken me maybe 15 minutes turned into multiple hours of testing, testing, testing for MSIE.
It seems to be working really well, but I only tested it on fairly modern browsers. If anyone has any problems with this script (e.g., you have Flash, but it’s not letting you use it), please let me know.
Also if there are any Javascript experts in the hiznat, please take a look at my code and let me know if you have any suggestions: http://static.getclicky.com/inc/javascript/flashcheck.js. FYI, I’m only setting the cookie for 1 day, so that if there any problems and I release updated code, the problem will solve itself in 24 hours. Once I’m positive this is working as expected, the expiration time will be much longer.