Open many links at once in Safari Can several links be opened at once in Safari?
Imagine you are on a page with a lot of links:



Would it be possible to select all the links and open them all in one single Command-click? As such:



I am often finding myself Command-clicking links for dozens of minutes a day, and wishing I could open more links all at once. Surely I'm not the only person in this situation!
There is a way to do something close - it involves adding a bookmarklet to Safari and selecting that once you're on the page. 

However, this will either open only the hyperlinks you've selected (i.e. highlighted) on the page or it will open all hyperlinks found on the page if you haven't highlighted any. In other words, it doesn't work in the Command + click manner you want.

If you're interested, here's the process to set this up:


Visit any page using Safari
Press CommandD to add a bookmark to the page you just visited 
In the highlighted field that appears in the window, change the text to something like Open all hyperlinks
Press OptionCommandB to edit bookmarks
Find the bookmark you just added and right-click on it
Select Edit Address... from the context menu
This should highlight the URL. Press Delete to remove it
Now paste the following code where the URL was previously:


javascript:(function(){var n_to_open,dl,dll,i; function linkIsSafe(u) { if (u.substr(0,7)=='mailto:') return false; if (u.substr(0,11)=='javascript:') return false; return true; } n_to_open = 0; dl = document.links; dll = dl.length; if (window.getSelection &amp;&amp; window.getSelection().containsNode) { /* mozilla */ for(i=0; i&lt;dll; ++i) { if (window.getSelection().containsNode(dl[i], true) &amp;&amp; linkIsSafe(dl[i].href)) ++n_to_open; } if (n_to_open &amp;&amp; confirm('Open ' + n_to_open + ' selected links in new windows?')) { for(i=0; i&lt;dll; ++i) if (window.getSelection().containsNode(dl[i], true) &amp;&amp; linkIsSafe(dl[i].href)) window.open(dl[i].href); } } /* /mozilla */ if (!n_to_open) { /*ie, or mozilla with no links selected: this section matches open_all_links, except for the alert text */ for(i = 0; i &lt; dll; ++i) { if (linkIsSafe(dl[i].href)) ++n_to_open; } if (!n_to_open) alert ('no links'); else { if (confirm('No links selected. Open ' + n_to_open + ' links in new windows?')) for (i = 0; i &lt; dll; ++i) if (linkIsSafe(dl[i].href)) window.open(dl[i].href); } } })();


Press Return to accept the code


To make this work, open any page in Safari and then select the bookmarklet. One of the following things will happen:


if you haven't highlighted any hyperlinks on the page, the code will proceed to open all hyperlinks in a separate tab
if you've highlighted x number of hyperlinks, then the code will proceed to open those selected hyperlinks in separate tabs


IMPORTANT: If this doesn't work for you, ensure that you have Javascript enabled. You can do this via Safari > Preferences > Security.

One more thing - I have tried many times to get the above javascript to work as a Service in Safari (thinking that would be better than the bookmark approach), but have never been able to get it to work. On the off-chance you do, please share how. :)