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

河南教师培训网

admin5个月前 (12-14)js215
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

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

js跳转到指定url

在 JavaScript 中,可以使用以下方法将页面跳转到指定的 URL:window.location.href = 'http://example.com';  ...

有iframe界面的自动下一集

测试页面https://www.qiju.cc/vod/play/id/356/sid/2/nid/1.html下面是油猴代码,方法一采用延时器 // ==UserScript== // @name      &nb...

foreach用法

// 获取页面上所有的 tbody 元素 let tbody = document.querySelectorAll('tbody') // 遍历每个 tbody 元素 tbody.f...