Skip to content

Instantly share code, notes, and snippets.

@0xBADDCAFE
Last active December 21, 2015 00:59
Show Gist options
  • Save 0xBADDCAFE/6224420 to your computer and use it in GitHub Desktop.
Save 0xBADDCAFE/6224420 to your computer and use it in GitHub Desktop.
書き捨て。リンクが大量に詰まったtxtファイルをブラウザで開き、一括で開くためのbookmarklet。 http://ted.mielczarek.org/code/mozilla/bookmarklet.html 辺りで変換して使える。 Fxでタブ固定前提で書いているので、chromeでやると新規窓がバンバン開いてウボァ
javascript:(function(){
URLtext=document.getElementsByTagName("pre").item(0).firstChild.nodeValue;
URLs=URLtext.split("\n");
len=URLs.length;
for(i=0;i<len;i++){
if(URLs[i].indexOf("http")==0){
if(i>0&&i%2510==0){
if(!confirm("Open next 10 URLs?\nstatus: "+i+"/"+len)){
return;
}
}
window.open(encodeURI(URLs[i]));
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment