Created
January 6, 2010 05:05
-
-
Save azu/270029 to your computer and use it in GitHub Desktop.
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
(function(){ | |
var w=window,document=w.document,t=w.Video.title; | |
var flvplayer = $("flvplayer"); | |
if(flvplayer.src.indexOf("flvplayer_wrapper") == -1){ | |
var loadRatio=setInterval(function(){ | |
var ratio = flvplayer.ext_getLoadedRatio(); | |
if(!ratio) return; | |
else if(ratio<1) document.title="("+(ratio*100|0)+"% loaded) "+t; | |
else if(ratio==1){ | |
clearInterval(loadRatio); | |
document.title="○"+t; | |
chplyr(); | |
} | |
},2000); | |
} | |
function chplyr(){ | |
var so=new SWFObject("flvplayer_wrapper.swf","flvplayer","952","510","10",""); | |
var vars=["v","videoId","movie_type","wv_id","wv_title","thumbTitle","thumbDescription","player_version_xml"]; | |
for(var i=0; i<vars.length; i++){ | |
var VARS=eval("window.so.variables."+vars[i]); | |
if(!VARS) return; | |
so.addVariable(vars[i],VARS); | |
} | |
so.addVariable("noBanner","1"); | |
so.addVariable("noNicomesse","1"); | |
//if(window.so.variables.movie_type=='mp4') so.addParam("quality","low"); | |
so.addParam("allowScriptAccess","always"); | |
so.write("flvplayer_container"); | |
} | |
})(); |
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
[Replace] | |
Name = Wrapper replace.jsJavaScript埋め込み | |
URL = www.nicovideo.jp/watch/nm | |
Match< | |
</body> | |
> | |
Replace< | |
<script type="text/javascript" charset="utf-8" src="/local/Nicocache_wrapper_replace.js"></script> | |
</body> | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment