Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Open new tab in Safari on the left Web Browsers
This script opens a new Safari window if none is open, maximizes the front window if minimized, and opens a new focused tab on the left with your bookmarks, with the text caret in the address bar.

I Googled for such a script to no avail so I made it myself. Bound it to ⌘T and scope Safari in Quıcĸsıɩⅴεʀ (of course you're using Quıcĸsıɩⅴεʀ, what else?) or any other lesser hotkey application. You can still use New Tab menu item to open tabs on the right by changing the shortcut in the Keyboard Shortcuts section of System Preferences, say to ⇧⌘T.

If you open bookmarks:// you may notice a flicker when setting the focus on the first tab. It may be due to the applescript command used — if you find a better method put it in the comments. Also, I used clicking "Open Location…" instead of setting the "AXFocused" attribute because the item hierarchy changes when in full screen mode.

tell application "Safari"
	if windows is {} then
		make new document
	else
		tell first window
			if miniaturized then
				set miniaturized to false
				make new tab at beginning with properties {URL:"bookmarks://"}
				set current tab to first tab
				tell application "System Events" to tell process "Safari" to tell menu bar 1 to tell menu bar item "File" to tell menu 1 to click menu item "Open Location…"
			else
				make new tab at beginning with properties {URL:"bookmarks://"}
				set current tab to first tab
				tell application "System Events" to tell process "Safari" to tell menu bar 1 to tell menu bar item "File" to tell menu 1 to click menu item "Open Location…"
			end if
		end tell
	end if
end tell
    •    
  • Currently 3.67 / 5
  You rated: 1 / 5 (6 votes cast)
 
[5,355 views]  

Open new tab in Safari on the left | 0 comments | Create New Account
Click here to return to the 'Open new tab in Safari on the left' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.