MonkeyForDesigner

用于中建信和学堂党课自动挂机

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        MonkeyForDesigner
// @namespace   MonkeyForDesigner
// @match       https://e-cscec.zhixueyun.com/
// @grant       none
// @version     1.1
// @author      -
// @description  用于中建信和学堂党课自动挂机
// ==/UserScript==
(function() {
    'use strict';
    console.log("Start.");
    setTimeout(checkbtm, 5000);
})();

function checkbtm() {
    var a = 1;
    console.log("conntinue");
    var next_btm = document.getElementById("D212btn-ok");
    var end_btm = document.getElementById("D211anewStudy");

    if (next_btm) {
        next_btm.click();
        console.log("Get btm and clicked.");
    }
    if (end_btm) {
        if (a === 1) {
            alert("Done!");
            console.log("Done!");
            a--;
        } else {
            console.log("Something Wrong!");
        }
    }
    setTimeout(checkbtm, 1000);
}