Quickly whitelist sites in Kill-Flash

7/06/2010

Is it hypocritical of me to write about a Flash blocker when I’ve spent a good portion of my time the last four years doing Flash? Maybe, but some of the sites out there have ridiculous amounts of intrusive and annoying banner ads, and I just can’t stand having my the fans on my Mac blowing a fuse every time I want to check out the news.

My favorite implementation of Flash-blocking has always been ClickToFlash which is a Safari-only plugin that works exactly as advertised. You click the element to load Flash. Sadly, as mentioned, it’s Safari-only and my browser of choice these days is Google Chrome.

Jason 128Fortunately I found a port, or perhaps a backwards engineered version for Chrome named, somewhat more aggressively, Kill-Flash. It works on exactly the same principle. All Flash elements are replaced with an inconspicuous grey-scale gradient with the label “Flash”, and you “Click To Flash”… Duh.

Stupidly however, I have found no simple way to add sites to the plugins whitelist. A few sites (YouTube and GMail) are whitelisted by default, but no option that I’ve found to add new sites. There are several sites I visit on a regular basis and where I want to see the Flash. Hell, my own blog uses several (subtle, I hope) Flash elements and I don’t need to see those grey boxes every time I come here. In fact, personally I think perhaps a “blacklist mode” would be my preferred way to operate.

So, anyway. I started digging around in the Library to figure out how to add sites to the whitelist. The first issue of course is to find out where the whitelist is located. A couple of headscratches later I found that this is the file you need to deal with:

/Users/USERNAME/Library/Application\ Support/Google/Chrome/Default/Extensions/kfncbcioneejfnnelcdmocdjncbmceea /1.1/kill_flash.js

I’m not sure whether or not that crazy string is the same for everyone or generated randomly for each installation. If you see the kill_flash.js you’re there.

Opening this file reveals, at the very top the following variable.

1
var whitelist = ["www.youtube.com","mail.google.com","gmail.com"];

What you need to do is simply append the domains you want to whitelist to this array, in quotes and separated by commas. Like so:

1
var whitelist = ["www.youtube.com","mail.google.com","gmail.com", "ctrloptcmd.com"];

When you’ve done this you might want to create an alias for easy access to the file. Personally I just dragged it to my Dock for the sake of convenience.

I might at some point write an AppleScript or something to make this easier. If that ever happens I’ll be sure to post it here.

No Comments