🥇【华医网助手】huayiwang_完全免费_无人值守_自动播放|另有代挂_全自动_安全可靠_过人脸_全网最低价

huayiwang, 华医网,自动播放,自动静音,屏蔽答题,调整视频质量为最低,当前视频播放结束自动进入下一个视频,播放结束清理无用定时器

目前为 2024-07-24 提交的版本。查看 最新版本

// ==UserScript==
// @name         🥇【华医网助手】huayiwang_完全免费_无人值守_自动播放|另有代挂_全自动_安全可靠_过人脸_全网最低价
// @namespace    http://tampermonkey.net/
// @version      1.4.2
// @description  huayiwang, 华医网,自动播放,自动静音,屏蔽答题,调整视频质量为最低,当前视频播放结束自动进入下一个视频,播放结束清理无用定时器
// @author       华医网助手
// @license      AGPL License
// @match        *://*.91huayi.com/course_ware/course_ware_polyv.aspx?*
// @match        *://*.91huayi.com/pages/exam.aspx?*
// @match        *://*.91huayi.com/pages/exam_result.aspx?*
// @match        *//*.wsglw.net/train/courseware/cc?*
// @match        *://*.91huayi.com/*
// @grant        none
// ==/UserScript==

(() => {
  // 非播放界面直接返回
  var urlInfos = window.location.href.split("/");
  var urlTip = urlInfos[urlInfos.length - 1].split("?")[0];
  if (urlTip != "course_ware_polyv.aspx") {
      return
  }
  addInfo();
  document.querySelector("button[onclick='closeBangZhu()']").click();//关闭温馨提醒
  killQuestion();
  examherftest()
  let video = document.querySelector('video');
  window.examInterval = setInterval(() => {
      examherftest()
  }, 1000);
  window.playInterval = setInterval(() => {
    if (video.paused) {
      video.play();
    }
    if (window.player && window.player.getCurrentLevel() != 1) {
          window.player.changeLevel(1)
    }
    video.volume = 0;
    video.muted = true;
  }, 1000);
  console.log()
  function examherftest() {  //考试按钮激活状态检测
      var hreftest = document.getElementById("jrks").attributes["href"].value;
      if (hreftest != "#") { //考试按钮已激活
        clearInterval(window.playInterval);
        clearInterval(window.killQuestionInterval);
        //播放下一个视频
        const targetElements = document.querySelectorAll("i[id='top_play']");
        const parentElement = targetElements[0].parentElement;
        const grandparentElement = parentElement.parentElement;

        const lis = document.querySelectorAll("li[class='lis-inside-content']");
        var index = Array.from(lis).findIndex(li => li === grandparentElement);
        console.log(index);
        if (index + 2 <= document.querySelectorAll("li[class='lis-inside-content']").length) {
          index += 2;
          console.log("新的Index" + index);
          document.querySelector("#top_body > div.video-container > div.page-container > div.page-content > ul > li:nth-child(" + index + ") > h2").click();
          setTimeout(function () {
            document.evaluate("//button[contains(., '知道了')]", document, null, XPathResult.ANY_TYPE).iterateNext().click();
          }, 2000);
        };
      };
  };

  function killQuestion() {
      (async function () {
          while (!window.player || !window.player.sendQuestion) {
              await sleep(20);
          };
          //console.log("课堂问答跳过插入");
          window.player.sendQuestion = function () {
          //console.log("播放器尝试弹出课堂问答,已屏蔽。");
          };
      })();
      window.killQuestionInterval = setInterval(async function () {
          try {
              if ($('.pv-ask-head').length && $('.pv-ask-head').length > 0) {
                  console.log("检测到问题对话框,尝试跳过");
                  $(".pv-ask-skip").click();
              };
          } catch (err) {
              console.log(err);
          };
          try {
              if ($('.signBtn').length && $('.signBtn').length > 0) {
                  console.log("检测到签到对话框,尝试跳过");
                  $(".signBtn").click();
              };
          } catch (err) {
              console.log(err);
          };
          try {
              if ($("button[onclick='closeBangZhu()']").length && $("button[onclick='closeBangZhu()']").length > 0 && $("div[id='div_processbar_tip']").css("display") == "block") {
                  console.log("检测到温馨提示对话框(不能拖拽),尝试跳过");//
                  $("button[onclick='closeBangZhu()']").click();
              };
          } catch (err) {
              console.log(err);
          };
          try {
              if ($("button[class='btn_sign']").length && $("button[class='btn_sign']").length > 0) {
                  console.log("检测到温馨提示对话框(疲劳提醒),尝试跳过");
                  $("button[class='btn_sign']").click();
              };
          } catch (err) {
              console.log(err);
          };
          try {
              if ($('video').prop('paused') == true) {
                  console.log("视频意外暂停,恢复播放");
                  $('video').get(0).play();
              };
          } catch (err) {
              console.log(err);
          };
      }, 2000);
  };

  function addInfo() {
    let tip = document.createElement('p');
    tip.style.fontSize = '50px';
    tip.style.color = 'red';
    tip.style.textAlign = 'center';
    tip.textContent = '有合作需求可加v: idpx1995';
    document.body.appendChild(tip);
  };
})()

QingJ © 2025

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