Greasy Fork

来自缓存

Greasy Fork is available in English.

2024年度河北省技工院校教师线上研修班

2024年度河北省技工院校教师线上研修班视频课件自动播放

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         2024年度河北省技工院校教师线上研修班
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  2024年度河北省技工院校教师线上研修班视频课件自动播放
// @author       Suny
// @match        https://szyxy-kfkc.webtrn.cn/learnspace/learn/learn/templatetwo/courseware_index.action*
// @match        https://szyxy-kfkc.webtrn.cn/learnspace/learn/learn/templatetwo/index.action*
// @icon         <$ICON$>
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    let url = window.location.pathname
    if (url == "/learnspace/learn/learn/templatetwo/index.action"){
        console.log("SDG:mian page")
        // 关闭30分钟提示框
        let iiii=setInterval(function() {
            // console.log("ttttt")
            let btn=document.querySelector('div.layui-layer-btn.layui-layer-btn- > a')
            if (btn) {
                btn.click()
            }
        },6000)
    }else if(url == "/learnspace/learn/learn/templatetwo/courseware_index.action"){
        console.log("SDG:mainCont")
        let courseFrame = document.querySelector("#mainFrame")
        let ii = setInterval(function(){
            let video = courseFrame.contentDocument.querySelector('video')
            if (video && video.duration){
                console.log("duration:",video.duration)
                console.log("currentTime:",video.currentTime)
                if(video.currentTime==video.duration){
                    let notlist = document.querySelectorAll('div[itemtype="video"][completestate="0"]')
                    if (notlist.length>1){
                        notlist[1].click()
                    }else{
                        clearInterval(ii)
                    }
                }else{
                    video.play()
                }
            }
        },10000)
    }
})();