Open new tab in Safari on the right

1.5k Views Asked by At

I recently moved away from Mac OS Sierra (yes I know I'm late) to High Sierra and I was forced to update to Safari Version 13.1.2. Now I am profoundly annoyed by it opening new Tabs (t) next to my active tab instead of all to the right as it used to.

3

There are 3 best solutions below

1
On BEST ANSWER

Knowing now that there is a menu entry "New Tab at End", there is no need for an Apple script or QuickSilver or anything. Just open System Preferences > Keyboard > Shortcuts, and add a shortcut using the plus button like the following:

Application: Safari.app, Menu Title: New Tab at End, Keyboard Shortcut: ⌘T

1
On

I believe while in Safari, using the keyboard shortcut ⌥ ⌘ T Will open a new tab to the far right

tell application "Safari" to activate

tell application "System Events" to tell process "Safari"
    keystroke "t" using {option down, command down}
end tell
0
On

So here is how to work around it. Open "Script Editor" and paste this code:

tell application "Safari"
    if windows is {} then
        make new document
    else
        tell first window
            set current tab to last 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 "New Tab"
        end tell
    end if
end tell

Disclaimer: this code is highly inspired by the code from xhinter on Mac OS X Hints, all kudos to him.

Save the script as Tab in Safari on the right.scpt in your ~/Library/Scripts folder (important for Quicksilver to find it). To run it you will need to allow rights to the app in the accessibility settings, the system will prompt you, don't discard it.

Check if Quicksilver > Catalog includes your user scripts, and refresh it to make sure the newly created script is in the catalog. Go to Triggers > Custom Triggers, add one via the plus in the bottom and type tabin, it will bring up the script as result. Enter closes the window. Press the ℹ️ in the bottom. Under Settings, add the Shortcut ⌘t. Under Scope, select Enabled in selected applications, in the textfield enter "Safari" which will be parsed automatically. See here for a more detailed description of scripts in Quicksilver.

That's it. Have fun!