Skip to content

Instantly share code, notes, and snippets.

@mgng
Created April 16, 2012 13:52
Show Gist options
  • Select an option

  • Save mgng/2398972 to your computer and use it in GitHub Desktop.

Select an option

Save mgng/2398972 to your computer and use it in GitHub Desktop.
youtubeどうにかするやつ
youtube動画開いてアドレスバーに以下コピペしてエンター押すと画面したのほうに動画ファイルのリンクが出る
javascript:(function(){var s=document.createElement('script');s.src="http://bit.ly/IYtnfi";s.charset="utf-8";document.body.appendChild(s);})()
(function(){
var d=yt.playerConfig.args.url_encoded_fmt_stream_map.split(','),m='',f=decodeURIComponent,i=0,l=d.length,t,r,b,p,a;
for(;i<l;i++){
t=d[i].split('&');
r=[f(t[0].replace(/^url=/,m)),f(t[1].replace(/^quality=/,m)),f(t[3].replace(/^type=/,m))];
p=document.createElement('h1');a=document.createElement('a');
a.href=r[0];a.innerHTML=r[1]+'('+r[2]+')';
p.appendChild(a);document.body.appendChild(p);
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment