116/*F5*/: function(){
try{
var long = RequestManager.getCumulativeTime(RequestManager.RequestQueues[RequestManager.RequestQueues.length- 1].id);
}catch( e ){
var long = 0;
}
NicoLive.postComment("現在のストック:"+RequestManager.RequestQueues.length+" 累計:"+RequestManager.getCumulativeTime(long), "");
},
【VideoInformation.js】
・・・
var __VideoInformation__MylistIDs = __VideoInformation__getMylistIDs();
//add start
var __VideoInformation__playStateTimer = 0;
//add end
function __VideoInformation__onConnect(lv){
・・・
__VideoInformation__receiveComment(new Chat("<chat>/play "+contents[i].text+"</chat>"));
//add start
// 接続時に流れている動画の進捗状態を表示
if(__VideoInformation__playStateTimer!=0){
clearInterval(__VideoInformation__playStateTimer);
__VideoInformation__playStateTimer = 0;
}
try{
var start_time = Number(contents[i].getAttributeNode("start_time").value)-9*60*60;
var duration = Number(contents[i].getAttributeNode("duration").value);
}catch( e ){
var start_time = 0;
var duration = 0-31;
}
__VideoInformation__playStateTimer = setInterval(function(){
__VideoInformation__showplayState(start_time,duration);
},500);
//add end
}
}
});
}
//add start
function __VideoInformation__showplayState(start_time,duration){
var now_time = Math.floor((new Date().getTime()+new Date().getTimezoneOffset()*1000*60)/1000);
var played_time = now_time-start_time;
if(played_time < duration){
document.getElementById("playState").style.cssText = "color:red;";
var str = convertTimeString(played_time)+"/"+convertTimeString(duration);
}else if(duration-played_time>=0-30){
document.getElementById("playState").style.cssText = "color:WindowText;";
var str = "再生終了";
clearInterval(__VideoInformation__playStateTimer);
__VideoInformation__playStateTimer = 0;
}else{
document.getElementById("playState").style.cssText = "color:WindowText;";
var str = " ";
clearInterval(__VideoInformation__playStateTimer);
__VideoInformation__playStateTimer = 0;
}
document.getElementById("playState").innerHTML = str;
}
//add end
イーライセンスコード対応版について。
イーライセンスコードは10000から始まる5桁のようなので、変更お願いします。
ファイル:Main.js の function checkMUSICCode 関数
var smEL = text.match(/(sm|nm)\d+.+?\d+el/ig);
を
var smEL = text.match(/(sm|nm)\d+.+?[0-9]{5}el/ig);
var el = smEL[i].match(/\d+el/);
を
var el = smEL[i].match(/[0-9]{5}el/);
に変更してください。変更しなくても動きます。
ついでに
JASコード対応部分についてそれぞれ
var smJAS = text.match(/(sm|nm)\d+.+?[0-9][0-9a-z][0-9]-[0-9]{4}-[0-9]/ig);
var jas = smJAS[i].match(/[0-9][0-9a-z][0-9]-[0-9]{4}-[0-9]/);
JRCコード対応部分もそれぞれ
var smJRC = text.match(/(sm|nm)\d+.+?[0-9]{7}jrc/ig);
var jrc = smJRC[i].match(/[0-9]{7}jrc/);
に変更を推奨です。
>>320
ごめんなさい。一部修正。
JASコード対応部分についてそれぞれ
var smJAS = text.match(/(sm|nm)\d+.+?[0-9][0-9a-zA-Z][0-9]-[0-9]{4}-[0-9]/ig);
var jas = smJAS[i].match(/[0-9][0-9a-zA-Z][0-9]-[0-9]{4}-[0-9]/);
イーライセンスコード対応部分について
var smEL = text.match(/(sm|nm)\d+.+?[0-9]{5}(EL|el)/ig);
var el = smEL[i].match(/\s[0-9]{5}(EL|el)\s/);
JRCコード対応部分にそれぞれ
var smJRC = text.match(/(sm|nm)\d+.+?[0-9]{7}(JRC|jrc)/ig);
var jrc = smJRC[i].match(\s/[0-9]{7}(JRC|jrc)\s/);
>>324 修正。コード入力部分では多分最後。
var jas = smJAS[i].match(/\s[0-9][0-9A-Z][0-9]-[0-9]{4}-[0-9]/i);
var el = smEL[i].match(/\s[0-9]{5}EL/i);
var jrc = smJRC[i].match(/\s[0-9]{7}JRC/i);
ぞれぞれ置き換えをお願いします。
JASコード及び識別子の大文字小文字両対応版です。
function loadMusicCode(){
try{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var file = fso.OpenTextFile("System\\jascode.csv");
while(!file.AtEndOfStream){
var line = file.ReadLine();
checkMusicCode(line);
}
file.Close();
}catch(e){}
}
// 管理コード付きリクエストをチェック
function checkMusicCode(text){
var sms = text.match(/(sm|nm)[0-9]+/);
if(!sms) return;
var smJAS = text.match(/\D[0-9][0-9a-z][0-9]-[0-9]{4}-[0-9]/ig);
var smEL = text.match(/\D[0-9]{5}el/ig);
var smJRC = text.match(/\D[0-9]{7}jrc/ig);
if(smJAS){
for(var i=0,l=smJAS.length; i<l; i++){
var jas = String(smJAS[i].match(/[0-9][0-9A-Z][0-9]-[0-9]{4}-[0-9]/));
if(JASCodes[sms[0]]==undefined||JASCodes[sms[0]]==""){
JASCodes[sms[0]] = jas;
}else if(!JASCodes[sms[0]].match(jas)){
JASCodes[sms[0]] +=" " + jas;
}
}
}
if(smEL){
for(var i=0,l=smEL.length; i<l; i++){
var el = String(smEL[i].match(/[0-9]{5}el/));
if(ELCodes[sms[0]]==undefined){
ELCodes[sms[0]] = el;
}else if(!ELCodes[sms[0]].match(el)){
ELCodes[sms[0]] += " "+el;
}
}
}
if(smJRC){
for(var i=0,l=smJRC.length; i<l; i++){
var jrc = String(smJRC[i].match(/[0-9]{7}jrc/));
if(JRCCodes[sms[0]]==undefined){
JRCCodes[sms[0]] = jrc;
}else if(!JRCCodes[sms[0]].match(jrc)){
JRCCodes[sms[0]] += " "+jrc;
}
}
}
MusCodes[sms[0]] = "";
if (JASCodes[sms[0]]){MusCodes[sms[0]] += JASCodes[sms[0]]+" "}else{JASCodes[sms[0]] = ""}
if ( ELCodes[sms[0]]){MusCodes[sms[0]] += ELCodes[sms[0]]+" "}else{ ELCodes[sms[0]] = ""}
if (JRCCodes[sms[0]]){MusCodes[sms[0]] += JRCCodes[sms[0]]+" "}else{JRCCodes[sms[0]] = ""}
if(document.getElementById("INF"+sms[0])) RequestManager.replaceHTML(RequestManager.Requests[sms[0]]);
}
var dummyAdminSetCmdID; //副管理者設定ID(コマンド)
var dummyAdminSetCmdName; //副管理者設定名前(コマンド)
var dummyAdminSetCmtID; //副管理者設定ID(コメント)
var dummyAdminSetCmtName; //副管理者設定名前(コメント)