泥头车工坊:修订间差异

无编辑摘要
第116行: 第116行:
var obj1 = [];
var obj1 = [];


function nameurl(a_name,a_url,a_time){
function nameurl(a_name,a_url,a_time,a_author){


    obj2 = {name:a_name,url:a_url,time:a_time} 
    obj2 = {name:a_name , url:a_url , time:a_time , author:a_author
    obj1.push(obj2);
    obj1.push(obj2);
    
    
第132行: 第132行:
      x_name = $(x1+">b").title;
      x_name = $(x1+">b").title;
      x_time = time2( $(tbody+">:nth-child("+x11+")> td:nth-child(3)> span ").textContent );
      x_time = time2( $(tbody+">:nth-child("+x11+")> td:nth-child(3)> span ").textContent );
     x_author = $(tbody+">:nth-child("+x11+") > td:nth-child(4) > div").title;
        //剔除无效链接👇
        //剔除无效链接👇
        if (tr_class == 'even js-dis' || tr_class == " js-dis" ){
        if (tr_class == 'even js-dis' || tr_class == " js-dis" ){
第138行: 第139行:
        }
        }
        else{
        else{
          nameurl(x_name,x_url,x_time);
          nameurl(x_name,x_url,x_time,x_author);
          x11 = x11+1;
          x11 = x11+1;
        }
        }
第159行: 第160行:


 下一首按钮用来切歌/开始播放。<syntaxhighlight lang="javascript" line="1">
 下一首按钮用来切歌/开始播放。<syntaxhighlight lang="javascript" line="1">
function drr(namee,url){
function drr(namee,url,author){
    $("#form-room-music-url").val(url);
    $("#form-room-music-url").val(url);
    $("#form-room-music-name").val(namee);
    $("#form-room-music-name").val(namee+" - "+author);
    $("#music_pannel > div > div:nth-child(2) > span.input-group-btn > input").click();
    $("#music_pannel > div > div:nth-child(2) > span.input-group-btn > input").click();
    a4();
    a4();
第173行: 第174行:
          bofangqi();
          bofangqi();
        }
        }
      },5000);
      },6000);


      setTimeout(function(){ 
      setTimeout(function(){ 
第179行: 第180行:
          bofangqi();
          bofangqi();
        }
        }
      },35000);
      },45000);
}
}
var oon = $("#message> div.room-submit-wrap> input")
var oon = $("#message> div.room-submit-wrap> input")
第194行: 第195行:
      element.innerHTML="循环:开启";
      element.innerHTML="循环:开启";
      fst = true;
      fst = true;
   }
}
$("<button type='button' onclick='lianbo();' id = 'aac'>连播:开启</button>").insertAfter(oon);
var lib = true;
function lianbo(){
   if (lib == true){
     var element=document.getElementById("aac");
     element.innerHTML="连播:关闭";
     lib = false;
   }
   else if(lib == false){
     var element=document.getElementById("aac");
     element.innerHTML="连播:开启";
     lib = true;
    }
    }


}
}
bfq1 = 0;
bfq1 = 0;
$("<button type='button' onclick='bofangqi();' id = 'a12'>下一首</button>").insertAfter(oon);
$("<p>'JSON'<Textarea  id = 'JSON'  cols = '4'  rows = '1'  value = 'JSON' > </Textarea></p>").insertAfter(oon);
$("<p>'JSON'<Textarea  id = 'JSON'  cols = '4'  rows = '1'  value = 'JSON' > </Textarea></p>").insertAfter(oon);
$("<button type='button' onclick='bofangqi();' id = 'a12'> 下一首</button>").insertAfter(oon);
$("<p>间隔时间_单位:毫秒<Textarea  id = 'TIMEE' cols = '4'  rows = '1' value = 'TIMEEE' > </Textarea></p>").insertAfter(oon);
$("#TIMEE").val("3000")
setT = setTimeout(x345=1,3000);
setT = setTimeout(x345=1,3000);
function bofangqi(){
function bofangqi(){
 
   document.querySelector("#play-or-pause").click();
  
    x2 = JSON.parse( $("#JSON").val() );
    x2 = JSON.parse( $("#JSON").val() );
    x2_length = x2.length-1;
    x2_length = x2.length-1;
    musicbox = $("#musicBox > div > div.progress-music").attr("class");
    musicbox = $("#musicBox > div > div.progress-music").attr("class");
    if (  bfq1<=x2_length ){
    if (  bfq1<=x2_length && lib == true && musicbox =="progress-music" ){
      
      
      clearTimeout(setT);
      clearTimeout(setT);
      js1 = x2[bfq1];
     js1 = x2[bfq1];
      drr(js1.name,js1.url)
      drr(js1.name,js1.url,js1.author)
      bfq1 = bfq1+1;
     bfq1 = bfq1+1;
     setT = setTimeout(bofangqi,js1.time+3000);
     setT = setTimeout(bofangqi,js1.time +parseInt($("#TIMEE").val()));
 
    }
    }
    else if (fst == true){
    else if ( bfq1 > x2_length , fst == true && lib == true && musicbox =="progress-music"){
 
      bfq1 = 0;
      bfq1 = 0;
      setT = setTimeout(bofangqi,3000);
      setT = setTimeout(bofangqi,0);
 
   }
   else if(musicbox == "progress-music active"){
     setT = setTimeout(bofangqi,15000);
    }
    }
    else {}
    else{}


}
}
203

个编辑