Created
May 26, 2019 03:33
-
-
Save Constaline/4328e52c03dd5d21312bf7496cd24948 to your computer and use it in GitHub Desktop.
Revisions
-
Constaline created this gist
May 26, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ var urls=[]; var url=$('.content-learning,.content-unstart').each(function () { var str; str=$(this).parent().attr('href'); str=str.match(/\('(.+)'\)/)[1]; urls.push(str); }); var ifr=$('<iframe>'); var PN=0; var PF=false; var KF=false; var bdy; var str=''; var doc; ifr.attr('width','100%'); ifr.attr('height','900px'); $('body').prepend(ifr); doc=ifr[0].contentWindow.document; setInterval(function(){ str=$(doc).find('.learnpercent').text(); if(str.indexOf('完成')>0){ PF=false;PN++; } if(PF || PN>urls.length) return; PF=true; ifr.attr('src',urls[PN]); setTimeout(function(){ doc=ifr[0].contentWindow.document; $(doc).find('.prism-big-play-btn').click(); ifr[0].contentWindow.getTimu=function(index){ return false; } }, 5000); }, 7000);