职业技能提升倍速刷课zidukeji.com

收录 88

职业技能提升倍速
插件开启后进入课程页面不需要点开课程,10-20秒后自动开始,控制台有显示就说明在刷了,有错误不用管,不需要人脸识别,纯自动,人脸识别的弹窗不用关,刷完会有控制台和弹窗的提示,插件自动退出,整个课程大概需要20-30分钟

// ==UserScript==
// @name         职业技能提升倍速
// @namespace    http://tampermonkey.net/
// @version      1.3
// @description  插件开启后进入课程页面不需要点开课程,10-20秒后自动开始,控制台有显示就说明在刷了,有错误不用管,不需要人脸识别,纯自动,人脸识别的弹窗不用关,刷完会有控制台和弹窗的提示,插件自动退出,整个课程大概需要20-30分钟
// @author       ZDSJ
// @match        http://rksan.zidukeji.com/
// @grant        none
// ==/UserScript==
var isplay = 0;
var ready = 0;
var list = [];
(function() {
    'use strict';
    //var video_item = document.getElementsByClassName('el-col el-col-24 el-col-xs-12 el-col-sm-8 el-col-md-6 el-col-lg-4-8');
    nextReady();
    var p = setInterval(function(){
            if(isplay == 0 && ready == 1 && list.length != 0){
                var item = list.pop();
                console.log(item.getElementsByClassName('item-name')[0].innerText);
                play(item);
            }else if(list.length == 0){
                ready = 0;
                var next = document.getElementsByClassName('btn-next');
                if (next[0].disabled){
                    console.log('视频已刷完,插件即将结束');
                    console.log('退出');
                    console.log("视频已刷完,插件结束");
                    window.alert("视频已刷完,插件结束");
                    clearInterval(p);
                }else{
                    console.log(next);
                    next[0].click();
                    console.log('下一页');
                    nextReady();
                }
            }
      }, 1000*10);
    // Your code here...
})();


function nextReady(){
    var num = 0;
    var main = setInterval(function(){
    num++;
    if (num == 3){
        find(list);
        ready = 1;
        clearInterval(main);
        }
    }, 500)
}


function find(list){
     var video_item = document.getElementsByClassName('el-col el-col-24 el-col-xs-12 el-col-sm-8 el-col-md-6 el-col-lg-4-8');
     for(var i = 0; i < video_item.length; ++i){
         //var button = video_item[i].getElementsByClassName('cont-bottom');
         var item = video_item[i].getElementsByClassName('el-progress__text');
         if(item[0].innerText != '100%'){
             list.push(video_item[i]);
         }
     }
}


function play(video_state){
    //video_state.getElementsByClassName('cont-bottom').click();
    isplay = 1;
    var a = video_state.getElementsByClassName('video-item');
    a[0].click();
    multiplySpeed(16.0);
}


function multiplySpeed(speed){
    var i = setInterval(function(){
        var video = document.getElementById('myvideo');
        if (video != null){
            var v = video.firstElementChild.firstElementChild.firstElementChild;
            var num = v.duration;
            var videoSpeed = v.playbackRate;
            v.playbackRate = speed;
            v.currentTime = num - 20;
            console.log('视频倍速已开启');
            v.addEventListener('pause', function () { //暂停开始执行的函数
                v.play()
            });
            v.addEventListener('ended', function () { //结束
                console.log("本视频播放结束");
                var close = document.getElementsByClassName('el-dialog__close el-icon el-icon-close')[1];
                close.click();
                // e.log("关闭");
                isplay = 0;
            }, false);
            clearInterval(i)
        }
    }, 500);
}
none
打赏采用二维码方式。

添加新评论