AntiUselessFixed

Let machine to learn garbage for you!

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         AntiUselessFixed
// @namespace    http://tampermonkey.net/
// @version      0.12
// @description  Let machine to learn garbage for you!
// @author       You
// @match        http://texy.yunxuetang.cn/*
// @grant        none
// Forked from https://greasyfork.org/zh-CN/scripts/382986-antiuseless
// ==/UserScript==

(function() {
    'use strict';
    //Disable the system alert window
    var alert=function(){return 1}
    var confirm=function(){return 1}
    var prompt=function(){return 1}
    setInterval(function(){
        if($("#dvWarningView")) $("#dvWarningView").find("Input").click()
        if($("#dvSingleTrack")) $("#dvSingleTrack").find("Input").click()
    },2000)


    var dlist = $(".el-plancourselist",$("#divcourselist"))
    if(dlist && dlist.length>=2){
        var timer = 5000;
        dlist[1].childNodes.forEach(function (child) {
            var value = child.childNodes[9]
            if(value) var compl = child.childNodes[3].getAttribute("class") //picnostart piccomplected  picnostart last
            //console.log(compl);
            if(value && (compl == "picnostart " || compl == "picnostart  last") ){
                value=parseInt(value.innerHTML.slice(0,6))
                //console.log(value);
                setTimeout(function( ){
                    console.log(value);
                    child.childNodes[5].childNodes[2].click()
                    }, timer);
                timer += (value +2)*1000*60
            }
        });
    }else{
        console.log(0);
    }

})();