Monday, January 26, 2009

ClickToFlash - Stop Automatic Flash Loading in Safari

Daring Fireball posted about ClickToFlash, a Safari or WebKit plug-in that stops the downloading of Flash in the browser and currently shows a gradient instead. Click to load Flash if you want. While this is fantastic, and I wish it were built-in to Safari, the gradient isn't enough to know that it could be clicked. For example, if you go to the site for the upcoming MMO Star Wars: The Old Republic, all you see is a blank gradient screen. There is an open issue for this on Google Code, so hopefully in an upcoming release it's changed.

Update
When I was cleaning up the download, realized it came with the source code. I then cut and pasted the code from the open issue and put it into the _drawBackground method in the code, compiled, and replaced the installed plug-in with my custom built version. Problem solved, I now see Click To Flash centered in the gradient. Excellent!

If you want my custom version, click here to download. Source and the plug-in included, no warranties of course

Updatex2
Jonathan 'Wolf' Rentzsch has taken over ownership of the ClickToFlash project, and released ClickToFlash 1.1 today. This version never implemented the Click To Flash text, which was the change I made, with an image pictured left. The other big feature is a whitelist, so you can always load Flash on selected sites. This installer for this version will replace my custom built version if you installed that.