10.4: Make a New Tab button for Safari's toolbar

May 05, '05 02:45:00PM

Contributed by: yj

Tiger only hintHere's how to hack Safari's "Add Bookmark" toolbar button into a "New Tab" button. This old hint from activewin.com doesn't work any more due to the new architecture.

Disclaimer:b the method here worked for me and I make no guarantees that it'll work for you, even if it should. Don't blame me if your shiny new OS X goes to bits because of this!)...

  1. Backup Safari.
  2. Install XCode (from the OS X DVD). A bit of overkill for that one button, yes.
  3. Open Safari's package contents (control-click and select Show Package Contents)
  4. Navigate into Contents/Resources/English.lproj
  5. Open ToolbarItems.nib (double clicking should open with Interface Builder)
  6. In the 'ToolbarItems.nib (English)' window, double click on 'First Responder.'
  7. Press Command-Shift-I to bring up the Inspector window, if it's not already open
  8. In the Inspector window, press Command-1 to make sure you're looking at 'Attributes.' Click on Add, and create a new item called newTab.
  9. In the 'Toolbar Items' window, click on one of the 'torn pictures' and press Command-Shift-I to bring up the Inspector window if it's not already open.
  10. Select the one nearest the Address bar (this should correspond to the placement in the Customise Toolbar menu); this is the 'Add Bookmark' button.
  11. Press Command-2 or choose Connections. Select 'newTab' and click 'Change Action' or simply double-click on it; there should be a round pushbutton icon next to it now.
  12. Save, quit and test.
If it works, yay! If not, ummm, it wasn't my fault. I hope you remembered step one!

[robg adds: I haven't tried this; I find the Command-T shortcut is quick enough for me...]

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050430171056385