One of the things that bug the crap out of me is when you click an OS X notification of a tweet in notification center, it opens up in Safari. I usually use the desktop client, and it is disorienting and inconvenient to get notified of a tweet, and then be prompted authenticate to the twitter website. Here is the flow of the problem:

I create a sweet tweet in


And I hit send. I then start doing other things, like Xcode or Mail. Then someone responds:


I think that is a cool response, so I click the notification. BOOM! I get this in Safari:


WHAT? WHO? I expected to it to go to since that is where I started the sandwich conversation.

It was low level irritation, and then I saw this on Daringfirball:

Now, if only they would let Apple open this app instead of the website when you get notifications through OS X’s built-in Twitter support.

I would love that! For me, it would be good enough if it just opened the twitter app, since it would pretty much be near where I want. So I wondered if had a URL handler, and entering in twitter:// in Safari opened up

AHA! I could now write an safari extension to see if I was going to a address, and then open a twitter:// URL. I’m pretty good at Objective-C, but not so much javascript. Our web guy gave me this:


And then I created a Safari Extension and put it on github:

and now when safari loads up a URL, the page finishes loading, and the opens (or comes to the front). Same for notification center. Not perfect, but better.

Download it here:

Twitter Launcher