Is it possible in Safari (OSX) to open multiple/selected hyperlinks at once?

1

1

I'm looking for an extension capable of opening multiple hyperlinks at once in tabs.

I don't want to configure Safari to open in tabs any hyperlink clicked.
I wan't to select one or multiple hyperlinks and open all the pages at once.

Same behavior as: https://addons.mozilla.org/en-US/firefox/addon/multi-links/

Thx!

fro_oo

Posted 2011-09-22T13:02:10.780

Reputation: 121

Answers

0

Try this out as a bookmarklet:

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 && window.getSelection().containsNode) { /* mozilla */ for(i=0; i<dll; ++i) { if (window.getSelection().containsNode(dl[i], true) && linkIsSafe(dl[i].href)) ++n_to_open; } if (n_to_open && confirm('Open ' + n_to_open + ' selected links in new windows?')) { for(i=0; i<dll; ++i) if (window.getSelection().containsNode(dl[i], true) && 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 < 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 < dll; ++i) if (linkIsSafe(dl[i].href)) window.open(dl[i].href); } } })();

user127280

Posted 2011-09-22T13:02:10.780

Reputation: 1

1Could you explain what this does, or where you got the code from? – sblair – 2012-04-09T04:50:50.497