My First Safari Extension: Copy All Links

Say you encountered a list of links you want to download. How did you do that? So far in Safari, what you can do is to copy the links one by one. Not that convenience huh? In Chrome, you can use Link2Clip and select all links, then Shift-C to copy all links.

I can’t find such extension for Safari in the unofficial Safari Extension repository. So I thought I will make it myself and in the same time learn a thing about Safari Extension.

It turns out that it’s not that hard. The only problem I encountered is just because the documentation of Safari objects is not complete and the fact that it must be created with Javascript. I hate Javascript! But after spending some time reading this post and watching the WWDC video session 505 and 506 about creating extensions for Safari, I finally managed to finish the plugin.

So please welcome to world my first plugin:

Copy All Links Safari Extension

(if you have a problem by downloading, try to right click and click Download Linked File)

How to use the extension. Well, first you need to install the extension. After that select any text with links and right click. Select Copy All Links and you’ll get a dialog will all links in there. You can copy the links by selecting the text in the dialog. It’s not that convenience but Safari Extension AFAIK doesn’t provide any way to insert something to the clipboard.

Be gentle with the safari extension. It is after all my first safari extension.

Join the Conversation


  1. Nice addition to the world of extensions 🙂 Is it possible to show the links in a text block instead of a dialog?

  2. Hi Dricus, glad that you like the extension. By text block you mean something that popped-up in the middle of the screen? It’s possible. I will take your suggestion into consideration because I actually am trying to find a better way to do the copy.

    Thank for the suggestion!

  3. Shouldn’t the text be copied to the Mac pasteboard? After clicking OK and then opening a TextEdit document to paste into, the links aren’t be pasted. I’ve tried this with just 3-4 links and paragraphs containing 20 or more links also and it doesn’t work either way.

    Mac OS X 10.5.8
    PowerMac G4
    1.5 gig RAM

    1. No, you should get a dialog where you can copy the links from. Safari doesn’t allow access to clipboard, unfortunetely 🙁

  4. Well using Windows 7 Ultimate and Safari 5.0.5 (7533.21.1) And with no other extensions.

    After I highlight all the links, I right click and choose ‘Copy All Links’ a dialog box pops up, but it doesn’t allow me to copy/paste copy or ctrl-a/ctrl-c/crtl-v anything…

    What am I doing wrong?

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.