智慧树自动关闭弹窗,自动跳转下一节,自动刷课教程代码

经过检测代码二更加稳定,推荐使用。

智慧树刷课教程,不会的请咨询邮箱:[email protected]

git下载地址:https://gitee.com/hkq15/zhihuishu-hiai

智慧树自动关闭弹窗,自动跳转下一节,代码如下:

 console.log("成功运行自动刷网课智慧树版");
var _it = null;
start();
// 弹题修复
setInterval(function(){
  $(".popboxes_close.tmui_txt_hidd").click();
},500);
closeQuestion();
function closeQuestion(){
  clearInterval(_it);
  var t = $(".popboxes_close.tmui_txt_hidd");
  if( t.length != 0 ){
    t.click();
  }
  if( $(".popboxes_close.tmui_txt_hidd").length != 0 ){
    closeQuestion();
  }else{
    start();
  }
}
function start(){
  // 静音修复
  setInterval(function(){
    if(!$(".volumeBox").hasClass("volumeNone")){
      $(".volumeIcon").click();
      console.log("【提示】刷课程序已将视频静音");
    }
  },100);
  _it = setInterval(function(){
    console.log("【提示】刷课程序运行中");
    // 关闭弹题
    closeQuestion()
    // 判断清晰度调整为高清
    // if(!$(".line1bq").hasClass("active")){
    //   $(".line1bq").click();
    //   console.log("【提示】刷课程序已将清晰度调整为“标清”");
    // }
    // 1.5倍速
     $(".speedTab15").click();
    // 下一节课
    if($("div.bigPlayButton").attr("style") != "display: none;" && $(".popboxes_close.tmui_txt_hidd").length === 0 ){
      $("#nextBtn").click();
    }
  },5000);
} 

代码二:

var ti = $("body");
var video = $(".catalogue_ul1 li[id*=video-]");
var i = 1;
var v = 1;
video.css("color", "blue");
console.log("已选取" + video.length + "个小节,并已用蓝色标明,请检查是否有遗漏,如有遗漏,概不负责");
setTimeout(function () {
    $('.speedTab15').click();
    $('.volumeIcon').click();
    console.log("已进行静音和1.5倍加速");
}, 3000);
ti.on("DOMNodeInserted", function (e) {
    if (e.target.textContent == "关闭") {
        console.log("检测到第" + i + "个弹题窗口");
        window.setTimeout(function () {
            document.getElementById("tmDialog_iframe").contentWindow.document.getElementsByClassName("answerOption")[0].getElementsByTagName("input")[0].click();
            $(".popbtn_cancel").click();
            console.log("已关闭");
        }, 3000);
        i++;
    } else if (e.target.textContent == "本节视频,累计观看时间『100%』") {
        console.log("检测到视频观看完成,准备跳到下一节");
        $('.next_lesson_bg').find('a').trigger('click');
        console.log("已跳转");
        setTimeout(function () {
            $('.volumeIcon').click();
            $('.speedTab15').click();
            console.log("已进行静音和1.5倍加速");
        }, 6000);
        v++;
        console.log("目前播放了" + v + "个视频");
    }
});

具体教程:

只限谷歌浏览器和火狐浏览器使用,如果第一次失败,请重新试一下次。

教程:将代码复制进入浏览器按F12键,在右边console中输入代码回车键

 

 

更多资源:www.hiai.top

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章