zswlxy

try to take over the world!

目前為 2019-09-19 提交的版本,檢視 最新版本

// ==UserScript==
// @name         zswlxy
// @namespace    http://tampermonkey.net/
// @version      0.7
// @description  try to take over the world!
// @author       You
// @match        https://www.zswlxy.com.cn/kjwx/web/*
// @require      http://libs.baidu.com/jquery/2.0.0/jquery.min.js
// ==/UserScript==

(function () {
    'use strict';

    function init() {
        console.log('zswlxy');
        let sub = /toStudy/g
        if (sub.exec(location.href) == null) {

            var listc = [];
            let no = 0;
            let lf = /spoa01=(\d+)&access_token=(.+)/g;
            let lfe = lf.exec(location.href);
            var vspba01 = lfe[1];
            var vaccess_token = lfe[2];
            console.log(vspba01);
            console.log(vaccess_token);


            let listtr = $('tr.global_table_tr');
            $.each(listtr, function () {
                let td = $(this).find('td');
                console.log(td);
                let time = td.eq(2).text();
                time = time.substring(time.indexOf('/') + 1);
                console.log(time);
                let tdhtml = td.eq(4).html();
                let end = false;
                if (tdhtml.indexOf('完成学习') > 0) {
                    end = true;
                }

                let se = /toStudy\('(\d+)','(\d+)'\)/g.exec(tdhtml)
                let url = `https://www.zswlxy.com.cn/kjwx/web/toStudy?spoa01=${vspba01}&spba01=${se[1]}&spbb01=${se[2]}&access_token=${vaccess_token}`
                //console.log(url);

                listc.push({ no: no++, time: time, url: url, end: end })

            });


            let table = $('<table border="1"></table>');
            listc.forEach(function (t) {
                let tr = '<tr>';
                tr += '<td>' + t.no + '</td>';
                tr += '<td>' + t.time + '</td>';
                tr += '<td>' + t.url + '</td>';
                tr += '<td>' + t.end + '</td>';
                tr += '</tr>';
                table.append(tr);
            });
            $('body').append(table);

            looplook();

            function looplook() {
                for (let index = 0; index < listc.length; index++) {
                    const element = listc[index];
                    if (!element.end) {
                        console.log(element);
                        let content = document.createElement("a");
                        content.href = element.url;
                        content.target = '_blank';
                        document.body.appendChild(content);
                        content.click();
                        element.end = true;
                        setTimeout(looplook, (element.time + 3) * 1000*60);
                        break;
                    }
                }
            }



        } else {

            function loopclick() {
                let dis = $('.tijiao').css("display");
                if (dis != 'inline-block' && dis != none) {
                    console.log('dis');
                    $('.guanbi').click();
                }
            }

            function bclick() {
                console.log($('.prism-big-play-btn'));
                if ($('.prism-big-play-btn').length > 0) {
                    console.log('click1');
                    $('.prism-big-play-btn').trigger("click");
                    setInterval(loopclick(), 60000);
                }
            }


            console.log('sub');
            setTimeout(bclick, 2000);
        }
    }

    $().ready(init());
    // Your code here...
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址