選択範囲のリンクを開く
javascript:(function(){var%20n_to_open,dl,dll,i;%20function%20linkIsSafe(u)%20{%20if%20(u.substr(0,7)=='mailto:')
%20returnfalse;%20if%20(u.substr(0,11)=='javascript:')%20return%20false;%20return%20true;%20}%20n_to_open
%20=%200;%20dl%20=%20document.links;%20dll%20=%20dl.length;%20if%20(window.getSelection%20&&
%20window.getSelection().containsNode)%20{%20/*%20mozilla%20*/%20for(i=0;%20i%3Cdll;%20++i)%20{%20if%20
(window.getSelection().containsNode(dl[i],%20true)%20&&%20linkIsSafe(dl[i].href))%20++n_to_open;%20}%20if%20
(n_to_open%20&&%20confirm('Open%20'%20+%20n_to_open%20+%20'%20selected%20links%20in%20new
%20windows?'))%20{%20for(i=0;%20i%3Cdll;%20++i)%20if%20(window.getSelection().containsNode(dl[i],%20true)
%20&&%20linkIsSafe(dl[i].href))%20window.open(dl[i].href);%20}%20}%20/*%20/mozilla%20*/%20if%20(!n_to_open)
%20{%20/*ie,%20or%20mozilla%20with%20no%20links%20selected:%20this%20section%20matches
%20open_all_links,%20except%20for%20the%20alert%20text%20*/%20for(i%20=%200;%20i%20%3C%20dll;%20+
+i)%20{%20if%20(linkIsSafe(dl[i].href))%20++n_to_open;%20}%20if%20(!n_to_open)%20alert%20('no%20links');
%20else%20{%20if%20(confirm('No%20links%20selected.%20%20Open%20'%20+%20n_to_open%20+%20'%20links
%20in%20new%20windows?'))%20for%20(i%20=%200;%20i%20%3C%20dll;%20++i)%20if%20(linkIsSafe(dl[i].href))
%20window.open(dl[i].href);%20}%20}%20})();