Open in Firefox

I cur­rently use Safari as my pri­mary browser on OS X sys­tems. Often­times I find that I either want to dis­sect a web page in Fire­bug or even just see what it looks like in Fire­fox. This is kind of a pain because it takes sev­eral steps:

  1. Open Fire­fox (one step with Quick­sil­ver)
  2. Acti­vate Safari
  3. Copy URL from desired website
  4. Acti­vate Firefox
  5. Paste URL into Firefox.

I could prob­a­bly con­sol­i­date these steps a little bit (by drag­ging and drop­ping the URL per­haps), but the point remains, this is an annoy­ing process to go through every time I want to quickly check some­thing out in Firefox.

Last week I put together a nifty little script in Automa­tor to stream­line this process. Basi­cally, the script copies the URL from the active tab in Safari, opens Fire­fox and loads the page. I saved the script as an appli­ca­tion and with Quick­sil­ver it’s now just one step to acti­vate the script.

For the most part, the script was pretty easy to set up. There is a built-​in action to Get Current Webpage from Safari. There aren’t any script­able actions for Fire­fox from Automa­tor, but open­ing it is simple enough using a ter­mi­nal command:

open -a Firefox.app

The only slightly tricky part about the script was get­ting the copied URL to auto­mat­i­cally load when Fire­fox opens. After a little research I found that this could be simply passed as a para­me­ter to the open command:

open -a Firefox.app $@

Per­haps some other Safari-​lovers will find this useful. Enjoy.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.