ニコ動を直接見る…的な

    
      
  • /**
     * @title ニコ動を直接見る…的な
     * @description my bookmarklet
     * @license MIT License
     * @require 
     */
    
    
    window.O__O={};
    window.O__O.e1=setInterval(function(){
    	if(document.querySelector("#external_nicoplayer")){
    		window.O__O.i=document.createElement('iframe');
    		window.O__O.o=document.querySelector("#external_nicoplayer");
    		window.O__O.i.width=o.width;
    		window.O__O.i.height=o.height;
    		window.O__O.o.parentNode.replaceChild(i,o);
    	}
    },200);
    setTimeout(function(){
    	clearInterval(window.O__O.e1);
    },8000);
    if(location.host=="flapi.nicovideo.jp"){
    	if(opener!=null){
    		var x=new XMLHttpRequest();
    		x.addEventListener('readystatechange',function(e){
    			if(e.target.responseText.length>=60){
    				GM_setValue("cookie__flapi_nicovideo",document.cookie);
    				window.close();
    			}
    		},false);
    		x.open("GET",location.href);
    		x.send();
    	}
    }else if(location.host=="www.nicovideo.jp"){
    	var x=new XMLHttpRequest();
    	x.addEventListener('readystatechange',function(e){
    		if(e.target.responseText.length>=60){ 
    			window.O__O.i.src=decodeURIComponent(e.target.responseText.match(/url\=([\w\%\-\.]+)/)[1]);
    		}else{
    			window.open("http://flapi.nicovideo.jp/api/getflv/"+location.href.match(/sm\d+/)[0]);
    			setTimeout(function(){location.reload()},3000);
    		}
    	},false);
    	x.setRequestHeader("Cookie",GM_setValue("cookie__flapi_nicovideo"));
    	x.open("GET","http://flapi.nicovideo.jp/api/getflv/"+location.href.match(/sm\d+/)[0]);
    	x.send();
    }
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2014/01/12 18:34:35 - 2014-01-12
  2. 2014/01/12 18:31:28 - 2014-01-12
  3. 2014/01/11 20:07:19 - 2014-01-11
  4. 2014/01/11 20:06:37 - 2014-01-11
  5. 2014/01/11 20:02:49 - 2014-01-11
  6. 2013/11/16 09:55:22 - 2013-11-16
  7. 2013/11/16 09:54:55 - 2013-11-16
  8. 2013/11/14 18:08:32 - 2013-11-14
  9. 2013/11/14 18:03:34 - 2013-11-14
  10. 2013/11/14 17:56:52 - 2013-11-14
  11. 2013/11/14 17:43:38 - 2013-11-14
  12. 2013/11/13 20:14:29 - 2013-11-13