Last active
December 21, 2015 00:59
-
-
Save 0xBADDCAFE/6224420 to your computer and use it in GitHub Desktop.
書き捨て。リンクが大量に詰まったtxtファイルをブラウザで開き、一括で開くためのbookmarklet。
http://ted.mielczarek.org/code/mozilla/bookmarklet.html 辺りで変換して使える。
Fxでタブ固定前提で書いているので、chromeでやると新規窓がバンバン開いてウボァ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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