-
Notifications
You must be signed in to change notification settings - Fork 41
/
自动刷视频的脚本.txt
1 lines (1 loc) · 1.19 KB
/
自动刷视频的脚本.txt
1
function start(){if(typeof tm1!=="undefined"){clearInterval(tm1)}if(typeof tm2!=="undefined"){clearTimeout(tm2)}var urls=[];var url=$('.content-learning,.content-unstart').each(function(){var str;str=$(this).parent().attr('href');str=str.match(/\('(.+)'\)/);if(str!=null){urls.push('http://'+document.domain+str[1])}else{urls.push(location.href)}});fr4me='<frameset cols=\'*\'>\n<frame id=\'gx\' name=\'gx\' src=\''+location.href+'\'/>';fr4me+='</frameset>';with(document){write(fr4me);void(close())}var count=0;var unfinish=false;var str='';var ifr=window.frames["gx"];var doc=ifr.document;var tm1=setInterval(function(){str=$(doc).find('.learnpercent').text();if(str.indexOf('完成')>0){unfinish=false;count++}$(doc).find('.prism-big-play-btn pause').click();if(unfinish||count>urls.length)return;unfinish=true;$(doc).find('#gx').src=urls[count];document.getElementById("gx").src=urls[count];if(typeof tm2!=="undefined"){clearTimeout(tm2)}var tm2=setTimeout(function(){doc=ifr.document;$(doc).find('.prism-big-play-btn').click();$(doc).find('.prism-button prism-button-retry').click();ifr.getTimu=function(index){return false}},2000)},3000);return'本脚本开源地址:https://github.com/midpoint/2019gdgx'}start();