Greasy Fork is available in English.

遂宁市人事人才培训-刷课

遂宁市人事人才培训-刷课脚本

// ==UserScript==
// @name         遂宁市人事人才培训-刷课
// @namespace    https://www.tuziang.com/combat/2095.html
// @version      0.1
// @description  遂宁市人事人才培训-刷课脚本
// @author       兔子昂
// @match        *://*.snpxzx.cn/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    // Your code here...
    //2019年的课程名:《深入学习贯彻党的十九大精神,加强大数据时代互联网信息安全》
    var courseId='C95F1C64-25A0-4AE0-8FEA-A0904B4B7D1D'
    setInterval(function () {

        var nextNumber
        var nextHref
        if(window.location.href == 'http://www.snpxzx.cn/StuBack/MyCourse/Index?ClickedMenu=MyCourse'){
            nextNumber = document.getElementsByTagName("iframe")[0].contentWindow.document.getElementsByTagName("b").length
            nextHref = document.getElementsByTagName("iframe")[0].contentWindow.document.getElementsByTagName("tr")[nextNumber].getElementsByTagName("a")[0].href
            window.location.href = nextHref
        } 

        if(document.getElementById("CourseIframe")){
            //设置开始计时
            document.getElementById("CourseIframe").contentWindow.document.getElementById("currentTimeLabel").innerText="00:01:01"
            if(isPrepared){
                isPrepared=true
            }
        }
    }, 3000);
})();