Automatically Post Safari Tabs to Del.icio.us With “topost” Tag

I wrote a short AppleScript yesterday to allow you to automatically add the current tab in Safari to your bookmarks in Del.icio.us with a specified tag or tags. The default tag is “toPost.” Add the script into Quicksilver as a trigger and you’ve got an über convenient post later (or never) script.

Here is the script (or download it here):

-- To change the tags, edit text inside quotes below
-- Use spaces to seperate multiple tags (ex: "tagOne tagTwo")
set tags to "toPost"

-- build delicious URL for current tab in frontmost window of Safari
tell application "Safari"
    set u to (name of current tab of front window) & ¬
        "&url=" & (URL of current tab of front window) & ¬
        "&tags=" & tags
end tell

-- Add URL to Delicious
tell application "Safari"
    do JavaScript "javascript:void(open('https://api.del.icio.us/v1/posts/add?description=" & u & "','delicious','toolbar=no,width=150,height=100'));" in document 1
    delay 0.5
    close current tab of front window

end tell

This is basically a simple modification of the script written by Andrew Faden which does pretty much the same except from NetNewsWire instead of Safari. Be sure to check out his original script and also the much improved version submitted by Larry from http://scriptingforlawyers.com/.

Multi Safari

Apple has just released the 10.4.11 update for Mac OS X Tiger, which has two interesting tidbits. First of all, it lists “Improves compatibility when using OpenType fonts in QuarkExpress.” I would be really interested in knowing more about exactly what has changed here. Unfortunately, given how tight-lipped Apple usually is about these types of things, I doubt I’ll find out.

The second item pertains to Safari 3. Starting with this update, Safari 3 will be the default browser. Now, this is really great, but it introduces some problems with my workflow. If I install this update, how am I going to be able to continue to test my designs in Safari 2.x?

As it turns out, Michel Fortin has gone through the trouble of creating standalone versions of every Safari installment. So go ahead, jump on that update from Apple, then grab a standalone copy of Safari 2.

Firefox 3 To Ditch Unified Cross Platform Look

Mozilla’s Alex Faaborg announced a week or so ago that Firefox 3 would focus on visually integrating with the operating system:

Visual integration with Windows and OS X is our primary objective for the Firefox 3 refresh.

This is great news for Firefox, because as I have mentioned before, its user interface has really been the achilles’ heel of the browser, especially on the Mac.

Mozilla’s user experience team literally wants to do a better job of visually integrating with Windows than IE, and a better job of visually integrating with OS X than Safari. I don’t know if we will be able to pull that off, but that’s the goal.

I’m glad that they’ve recognized this as an issue and I can’t wait to see what they come up with. If Firefox actually did look as good or better than Safari on a Mac, I might use it as my primary browser.

Via Beauty And The Geek: Firefox 3’s Visual Makeover.

An Even Better Open in Firefox

Yesterday I blogged about the nifty little Open in Firefox script that I made. As it turns out, there is an even better way to this, using some fancy Quicksilver magic.

By using Proxy Objects in Quicksilver, you can gain access to the Current Web Page object. After making sure that you have activated the Open URL With... action in the Quicksilver preferences you are free to specify Firefox (or another browser).

Current Web Page → Open URL With... → Firefox

Once you have this working, you can set it up as a custom trigger. I set mine to the F1 key. Even better, this trigger is much more extendable than the script. You might not necessarily always want to open a URL in Firefox. Say you want to open a page in Opera. Just create another trigger, but leave out the item in the third pane.

Current Web Page → Open URL With... → "Leave this blank"

Now when you use that trigger, activate it with a hotkey (I used F2) and type in the first few letters of the browser (or program) you want the URL to open in.

Open in Firefox

I currently use Safari as my primary browser on OS X systems. Oftentimes I find that I either want to dissect a web page in Firebug or even just see what it looks like in Firefox. This is kind of a pain because it takes several steps:

  1. Open Firefox (one step with Quicksilver)
  2. Activate Safari
  3. Copy URL from desired website
  4. Activate Firefox
  5. Paste URL into Firefox.

I could probably consolidate these steps a little bit (by dragging and dropping the URL perhaps), but the point remains, this is an annoying process to go through every time I want to quickly check something out in Firefox.

Last week I put together a nifty little script in Automator to streamline this process. Basically, the script copies the URL from the active tab in Safari, opens Firefox and loads the page. I saved the script as an application and with Quicksilver it’s now just one step to activate 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 scriptable actions for Firefox from Automator, but opening it is simple enough using a terminal command:

open -a Firefox.app

The only slightly tricky part about the script was getting the copied URL to automatically load when Firefox opens. After a little research I found that this could be simply passed as a parameter to the open command:

open -a Firefox.app $@

Perhaps some other Safari-lovers will find this useful. Enjoy.



appointive
appointive
appointive
appointive