AntiUselessFixed

Let machine to learn garbage for you!

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

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

})();