京训钉自动播放下一章(2021版)

var buttons = document.getElementsByClassName("next_button___YGZWZ");
setInterval(function() {
    var button = buttons[0];
    if(typeof(button) != 'undefined'){
        console.log("next chapter!!!")
        button.click();
    }
},5000);
var outters = document.getElementsByClassName("outter");
setInterval(function() {
    var playing = document.getElementsByClassName("prism-big-play-btn");
    var attr = playing[0].getAttribute('class');
    if(attr.indexOf('playing') < 0){
        var outter = outters[0];
        if(typeof(outter) != 'undefined'){
            console.log("video start!!!")
            outter.click();
        }
    }
},5000);
setInterval(function() {
    var ant = document.getElementsByClassName("ant-btn-primary");
    if(ant.length != 0){
        ant[0].click();
    }
},5000);

 

posted @ 2021-10-29 09:11  代码堆里的看客  阅读(859)  评论(0编辑  收藏  举报