MonkeyForDesigner

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==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);
}