Tag Archives: copy all links

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.