AntiUselessFixed

Let machine to learn garbage for you!

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

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

})();