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

Clean flashlog.txt with a keystroke

5/02/2009

Scenario: You’re working with the Flex SDK and you’re tracing messages to the Terminal via flashlog.txt. The damn logfile has heaps of clutter in it from the last project you were working on, and you want to clean it up.

Solution: Save this snippet and assign it a Quicksilver hotkey:

1
2
3
4
try
    do shell script "rm ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt"
    do shell script "touch ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt"
end try

Result: You are happy. Go drink beer.

No Comments

Life hack: On the Job + Marco Polo

24/11/2008

Onthejob
The odds are good that you have to keep track on how much time you spend on any individual project for billing reasons or what have you. If you’re anything like me (and why wouldn’t you be) your fantastic right hemisphere of the brain makes you profoundly sucky at performing this dreary task.
Enter On the job, a quite wonderful little app that’ll do the job for you. However; If you are afflicted to the degree I am with this complete and utter incompetence at important but boring chores, you have difficulties even remembering to open the app to let it do it’s thing. ‘Why Martin, it’s simple’, I hear you exclaim, ‘you just put it in your start-up items, so that every time you start up your work computer it’ll launch the app!’ Well, no. You see, I use a MacBook which I carry between the office and home, and my innate loathing of shit starting up each time I start up my Mac would annoy me to no end. Besides, a more than likely scenario would be me quitting the app when going home and then forgetting to start it up again when I’m back at the office. Yes; I’m that terrible.

I considered this while in the shower, as these things are wont to happen, and came up with the idea of trying to make my laptop sniff out which wi-fi I was connected to and thusly be able to perform certain tasks based on that information. I started trying to work out whether it’d be possible to AppleScript a solution, or whether I’d have to try and apply my nigh-non existing Cocoa skills to pull this off.

Marco Polo
Ask and ye shall receive. Of course, if there’s a good idea to be had, most likely someone beat me to it. Enter Marco Polo.
This absolute gem of an app promises (and in the 30 mins I’ve used it; Delivers) context awareness for your Mac based on a whole load of criteria. For my purposes all I had to do was to make it sniff out the SSID of my office Wi-Fi and launch On the Job whenever the rule matched. I’ll also be setting it up to launch MediaLink when at home so that I’ll instantly start streaming media to my PlayStation. Yet these examples are just the tip of the proverbial iceberg. The possibilities are, perhaps, not endless but certainly numerous. I highly recommend checking out this killer combo, or just Marco Polo if your short term memory is better than mine (not hard) but context awareness might be interesting for you anyway.

On the job is shareware ($25) and Marco Polo is free as in speech and beer.

No Comments