Skip to content

Instantly share code, notes, and snippets.

@userid
Last active August 31, 2015 19:25
Show Gist options
  • Select an option

  • Save userid/491eb9d392b1fca639a4 to your computer and use it in GitHub Desktop.

Select an option

Save userid/491eb9d392b1fca639a4 to your computer and use it in GitHub Desktop.
//$("#btnNext").attr("onclick");
index = {'A':'0', 'B':'1','C':2,'D':'3', 'E':'4','F':'5'};
var first =2;
function skip_q(){
first =2;
var finish = '#nextPlayButton';
var o= $("#btnNext");
if(! o.attr("onclick")){
o= $(finish);
}
var a=o.attr("onclick");
i = a.lastIndexOf(",") ;
for(;i<a.length; i++){
key = index[a[i]];
if(key) {
console.log(a[i]+" "+key);
clickSelect(key);
$("#answer"+key).click();
}
}
if($('#confirmAnswer')){
$('#confirmAnswer').click();
}
o.click();
}
function skip_video(){
console.log("xxx");
if(first-->0){return;}
$.post(
"http://dfss.anjia365.com/jpv2/web/player!treePlayHandle.do?&handleType=1&curCourseId=8802"
,
function (d){
console.log(d.message);
if (d.message !="学习时长小于课件播放最小时长"){showNext();}
}
);
}
function test2(){
var time = 10000;
if( $("#ccPlayerDiv").html()=="" ){
time = 1000;
skip_q();
}else{
skip_video();
}
setTimeout("test2()", time);
}
setTimeout("test2()", 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment