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

Set up your own lifestream using FriendFeed and… Dirty hacks

10/01/2010

Lifestream
When Iceland went bust and started selling .is domains I grabbed martin.is. Of course I did. That’s the kind of guy I am. Even as I swiped that credit card (and by “swipe” I mean “typed in all my info into the appropriate boxes.”) I knew I had no idea what I was going to use it for, but what the hey; I’ve done plenty of even stupider domain purchases that never led to anything1.

So finally, the other day I decided to set up a “lifestream”. An aggregate feed of all the highly interesting stuff I do on the web. Not because I think anyone particularly needs or wants to know. It just seemed like the kind of thing that goes on a domain called “martin is”.
I really didn’t want to spend loads of time on this. I have a job, a daughter and a blog that are all already wailing for my attention, so tried plugging all my stuffs into a WordPress install using FeedWordPress and a couple of other similar plugins, but I found the results to be (unreliable | explosive | bewildering)2.

Alrighty then. What services do I know of that aggregate information like this? FriendFeed! I headed over to FF, and sure enough; Within half a minute I had managed to plug all the crap I generate into one massive hunka’data. In addition to supporting a bunch of services Friendfeed actually does pretty well parsing feeds from other sources and cutting the entries into little blurbs. Now only to get it out of there and onto my domain.

Read the rest of this article »

  1. Seriously. Need a domain?
  2. Pick one.
No Comments

Some Path Finder AppleScripts

6/03/2009

Path FinderHow’s that for a TitleCased title?
So I’ve been checking out Path Finder again. The thing with Path Finder is that it’s very nearly awesome, but there are a few things that bug the hell out of me. I may or may not come back to the most irritating shortcomings in a later post, but I’m going to address one of the main issues straight away; Path Finder has crappy support for AppleScript.
I love that little quirky language that actually gives me loads of control over the OS, but for some reason you can’t just rewrite your old AppleScripts to do a check for the current “Finder app” and react upon it with the same code. I have no idea why porting the Finder Dictionary to the Path Finder Dictionary is so hard (if I did I’d be writing some way cooler code than I currently am) but it bugs the hell out of me when some of my most frequently used scripts won’t work anymore. It’s like sitting down on a Mac that hasn’t got Quicksilver installed. You feel like you’re typing with boxing gloves.

Therefore I’ve set out to port my most crucial scripts so they’ll work whether I’m in Finder or Path Finder.

Read the rest of this article »

2 Comments

Macromedia ShockZone

11/12/2008

A while ago I was doing a talk on the Flash platform for NRK, and to give the audience a bit of perspective I took a trip down memory lane and dug up some real goodies. Oh yes.

Since this is too good to not to be repeated, allow me to present; the Macromedia ShockZone site from 1997:

Oops. Seems you don’t have Flash Player installed. Click here to fix it.

Click to start, or witness the fullbrowser glory.

2 Comments

TextMate theme-switcher script

10/09/2008
Summary: In which Martin ponders solutions on how to quickly switch themes in TextMate and comes up with a half-assed AppleScript / TM Command solution. Jump to the half-assed solution.

Edit: As these things usually go I had a bit of a revelation just minutes after posting this post. Completely by accident I typed the keystroke ⇧-⌃-⌥-T, which of course is mapped to the “Select Theme” – command in the Experimental Bundle and which I had completely and utterly purged from my mind. I’m pretty sure you want to use that solution rather than the one I outline in this post, but I’ll keep this around for posterity’s sake anyway. Original post follows.


I’m about to start teaching a 5 week class in ActionScript 3 and if there’s any possible way to avoid it, I won’t spend much time in the IDE code editor, because frankly; It sucks. So in order to make the differences between what the students will see on the screen (You guessed it. TextMate.) and what they’ll be working in themselves, at least initially, I played around with one of the themes in TextMate to make it look more like the Flash IDE editor.

From my beloved Twilight theme:
Tm Theme Twilight

To this IDE clone based on IDLE:
Tm Theme Idle

So since I’ll keep using my main theme for all my professional work I wanted a fast way of switching between the two themes (I’ll do a lot of work to save myself from dealing with a drop down menu). A bit of googling (actually a fair bit of googling) turned up this gem from a spanish speaking TextMate google group. Now, before you even start; Yes I feel slightly dirty about GUI-scripting as well. Making a script that simulates clicks rather than one that just tells the OS to perform whatever task associated with said click just feels wrong. But since not even a journeyman when it comes to the arcane arts of programming TextMate I’m just going to bite the bullet until someone (you?) comes up with a better solution.

Read the rest of this article »

1 Comment