蓉城先锋 - cddyjy.com

2023/10/12 11:55:42

当前为 2023-10-12 提交的版本,查看 最新版本

// ==UserScript==
// @name        蓉城先锋 - cddyjy.com
// @namespace   cddyjy
// @match       https://new.cddyjy.com/member-education/net-school/classroom/videoInfo
// @match       https://new.cddyjy.com/member-education/online/courseinfo
// @match       *://new.cddyjy.com/member-education/*
// @grant       none
// @version     1.03
// @author      tony
// @description 2023/10/12 11:55:42
// @license MIT
// ==/UserScript==


(function(){
  //var checkInTime =setInterval(function(){checkisFinish()},3000);
  var checkInTime = null, finish = null, btn=null;

  //返回播放菜单
  function goback()
  {
    gobackButton = document.getElementsByClassName("icon-back ivu-icon ivu-icon-ios-arrow-back");
    if(gobackButton!=null){
      gobackButton[0].click();
      return true;
    }else{
      return false;
    }
  }
  //检查是否播放结束
  function checkisFinish(){
    finish = document.getElementsByClassName("ivu-btn ivu-btn-primary ivu-btn-large");
    if (finish.length>0){
      finish[0].click();
      setTimeout(goback,parseInt(Math.random() * 1000 + 2000)) ;
      return;
    }
  }
    //选择“去学习”
  function startLearn()
  {
    allA = document.getElementsByClassName("ivu-table-column-right");
    if(allA.length>0){
      for(i=0;i<allA.length;i++){
        t = allA[i].lastElementChild.lastElementChild.innerHTML;
        if(t == '去学习'){
          tag = allA[i].lastElementChild.lastElementChild
          checkTag = tag.parentElement.parentElement.parentElement.children[4].lastElementChild.lastElementChild
          if (checkTag.className == 'ivu-progress ivu-progress-normal')
            {
              allA[i].lastElementChild.lastElementChild.click();
              break;
            }
        }
      }
    }
  }

  function play()
  {
    btn = document.getElementById("my-player_html5_api");
    //alert(btn.innerHTML);
    if(btn!=null){
      btn.click();
      return;
    }
  }


  checkInTime = setInterval(startLearn,parseInt(Math.random() * 1000 + 4000));
  play();
  checkInTime =setInterval(checkisFinish,parseInt(Math.random() * 1000 + 4000));
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址