Pluck tabs into windows of their own
Load Tab in New Window is an AppleScript for Safari that loads the frontmost tab in a new window and closes the original tab. It does nothing if there is only one tab in the frontmost window.
I find it useful when I would like to simultaneously view two pages that reside in tabs of the same window. I use this script to pull one of those pages out into a different window.
Demonstration
- Screencast (420K Flash animation)
Download
See my comments in the script for more information about how it works. Because Safari’s tabs are not scriptable, there is a bit of UI scripting used to close the original tab; this works well on my MacBook, but sometimes hangs unpredictably on my G4. I’m not sure why.
- ltinw.scpt.zip 1.0 (5k) “Compiled” version
- ltinw.applescript 1.0 (3k) Source
Comments and discussion at Mac OS X Hints.
Installation
Suggested installation location: ~/Library/Scripts/Applications/Safari/
The script can be invoked with the standard Mac OS X Script Menu, but I've found FastScripts to be a preferable alternative, primarily because of the ease with which reliable keyboard bindings can be assigned.