Turning a web link into a Dock icon (Mac)

26 October 2015, 06:00

A while ago I wrote about turning websites into apps that live in the Dock of the Mac. You can turn Facebook or Instagram into faux-apps that don’t have the usual browser toolbar, and so on. If you find it frustrating accessing such sites through your browser then it’s very useful.

But what if you simply want to add a web link to the Dock, so clicking it jumps straight to your favourite website within your favourite browser in the usual way?

OS X features a system that’s almost capable of this magic and I advise you to Google “webloc” if you want to know more. However, weblocs cannot be added to the main section of the Dock. They can only be added to the right of the Dock near the Trash.

Whatever the case, it’s really easy to turn a link into an Dock icon so that clicking it opens the site in the system web browser – either opening the browser from scratch, if it’s not already open, or opening it in a new tab.

Here are the steps:

  1. Open Script Editor. It’s in the Utilities folder in the Applications list of Finder.
  2. Click the New Document button at the bottom left of the file browser window that appears.
  3. In the main script editing area, type the following, replacing www.url.com with the link for which you want to create the Dock icon:
    do shell script "open http://www.url.com"
  4. Click File, hold down the Option (Alt) key, and then click Save As.
  5. In the File Format dropdown list at the bottom of the Save As dialog box, select Application.
  6. In the Save As name field, type the name of the website. This is what’ll appear when you hover over the icon in the Dock. It doesn’t matter where you save your new application but the Documents folder is as good a place as any.
  7. Find the new application you just created, then select it and tap Cmd+I on the keyboard.
  8. Temporarily switch to your browser to locate a suitable icon. Google Image Search is a good place to do this. Make sure you find one that’s nice and high-res. Right-click it within your browser and select Copy Image.
  9. Click the Get Info dialog box you opened earlier, then select the icon at the top left of it so that it’s highlighted. Then Tap Cmd+V.
  10. Close the Get Info window, and drag your new icon to the Dock to create a shortcut there – even if the icon doesn’t appear to have changed! Once in the Dock the icon will be correct.

Remember that you shouldn’t delete the original app, wherever you saved it. You haven’t copied it to the Dock in the last step above. You merely created a shortcut to the app.

Leave a comment...