当前位置:首页 > js > 正文内容

河南教师培训网

admin5个月前 (12-14)js245
JavaScript
// ==UserScript==
// @name         河南教师培训网
// @namespace    http://tampermonkey.net/
// @version      2024-12-14
// @description  try to take over the world!
// @author       You
// @match        https://www.teachersedu.cn/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=teachersedu.cn
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
let curVideoSrc = ''
setVideo()
function setVideo () {
    let video = document.querySelector('video')
    if (video && video.src !== curVideoSrc) {
        curVideoSrc = video.src
        video.addEventListener('ended', function () {
            let div_current = document.querySelector('.task-item.active')
            let next = div_current.parentNode.parentNode.parentNode.nextElementSibling
            next.querySelector('a').click()
        })
    }
}

setInterval(() => {
  let button = document.querySelector('.alert-box-btns .confirm-btn')
  if (button && button.innerText === '下一节') {
      button.click()
  }
  setVideo()
}, 3000)
})();

扫描二维码推送至手机访问。

版权声明:本文由匡民博客发布,如需转载请注明出处。

本文链接:https://kuangmin.top/post/41.html

“河南教师培训网” 的相关文章

油猴第一课百度两下

// ==UserScript== // @name         百度两下 // @namespace    http://tamp...