General Robots

links for 2009-03-25

1 Kommentar

  1. And here it is: Nie wieder alle Links einzeln anklicken!

    Zuerst diesen Link als Bookmarklet speichern:

    javascript:(function(){var%20n_to_open,dl,dll,i;%20function%20linkIsSafe(u)%20{%20if%20(u.substr(0,20)==’http://delicious.com’)%20return%20false;%20if%20(u.substr(0,7)==’mailto:’)%20return%20false;%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})();

    Anschließend einfach den Text mit vielen Links auswählen und dein Bookmarklet starten. Alle Links werden auf einen Schlag in neuen Fenstern geöffnet!

    Getestet mit Firefox und Safari.
    Code stammt zu 90 % von http://www.squarefree.com

    1# - ich - 25. März 2009 @ 21:00 Uhr Reply to this comment

Sag was!