安徽继续教育自动刷课

安徽继续教育 自动刷课,自动提交

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         安徽继续教育自动刷课
// @namespace    使用说明网址见作者
// @version      1.0
// @description  安徽继续教育 自动刷课,自动提交
// @author       xxmz
// @match        *://*.ahjxjy.cn/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';
    // Your code here...
    var confirm = function () {
        return true;
    };
    window.confirm = function () {
        return true;
    };
    setInterval(function () {
        for (var i = 0; i < document.getElementsByTagName('video').length; i) {
            var current_video = document.getElementsByTagName('video')[i]
            current_video.volume = 0
            current_video.playbackRate = 16.0
            if (current_video.ended) {
                if (document.getElementsByClassName('btn btn-green')) {
                    document.getElementsByClassName('btn btn-green')[0].click()
                }
            }
        }
        //判断当前是作业
        if (document.getElementsByClassName('e-save-b btn_save').length > 0) {
            var currentLi
            if (document.getElementsByClassName('e-save-b btn_save')[0].innerText == '提交作业') {
                for (let i = 0; i < document.getElementsByTagName('li').length; i) {
                    if (document.getElementsByTagName('li')[i].className == 'current') {
                        currentLi = i
                    }
                }
                document.getElementsByClassName('sectionlist btn_dropdown')[0].click();
                document.getElementsByTagName('li')[currentLi].getElementsByTagName('a')[0].click();
                document.getElementsByTagName('li')[currentLi].getElementsByTagName('a')[0].click();

            }
        }
    }, 2000)
})();