enetedu.com自动播放下一集

自动播放下一集

目前为 2023-11-07 提交的版本。查看 最新版本

// ==UserScript==
// @name         enetedu.com自动播放下一集
// @namespace    http://tampermonkey.net/
// @version      0.1.0
// @description  自动播放下一集
// @author       moxiaoying
// @match        https://a.gp.enetedu.com/MyCourse/Process*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=enetedu.com
// @grant        none
// @run-at       document-end
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    const sleep = async (time_delay) => {
        return new Promise(resolve => {
            setTimeout(() => {
                resolve()
            }, time_delay*1000)
        })
    }
    const iframe = document.querySelector('body > div > table:nth-child(13) > tbody > tr > td > table:nth-child(2) > tbody > tr > td > table:nth-child(2) > tbody > tr > td:nth-child(2) > table:nth-child(1) > tbody > tr > td > table:nth-child(1) > tbody > tr > td:nth-child(3) > form > table > tbody > tr > td:nth-child(2) > iframe')
    async function main(){
        await sleep(3)
        const video = iframe.contentDocument.getElementsByTagName('video')[0]
        video.onended = (e)=> {
            document.querySelectorAll('.tishivalju')[1].click()
        }

    }
    main()

})();

QingJ © 2025

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