Greasy Fork

Greasy Fork is available in English.

xx职业技能提升自动点击

点击要观看的课程,自动点击确定,自动下一章,省去频繁点击的烦恼

当前为 2020-07-22 提交的版本,查看 最新版本

// ==UserScript==
// @name         xx职业技能提升自动点击
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  点击要观看的课程,自动点击确定,自动下一章,省去频繁点击的烦恼
// @author       spark
// @match        https://www.bjjnts.cn/*
// @exclude      https://www.bjjnts.cn/userCourse
// @exclude      https://www.bjjnts.cn/userCenter
// @exclude      https://www.bjjnts.cn/login
// @exclude      https://www.bjjnts.cn/userSetting
// @exclude      https://www.bjjnts.cn
// @grant        GM_log
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';
    $("body").bind('DOMNodeInserted', function(e) {
        if($(".layui-layer-title").length >0){
            GM_log("是否弹出提示框");
            setTimeout(function (){
                $(".layui-layer-btn0").click();
            }, 3000);
        }
        if($('.face_recogn').css('display')=='block'){
            GM_log("点击人脸识别按钮");
            setTimeout(function (){
                $(".face_startbtn").click();
            }, 3000);

        }
    });

    $(".new_demoul").bind('DOMNodeInserted', function(e) {
        GM_log("是否播放结束");
        if( $(".course_study_sonmenu.on").length>0){
            GM_log("下一章");
            setTimeout(function (){
                if($(".course_study_sonmenu.on").parent().next().children("div").children("a").attr("data-lock")=="0"){
                    $(".course_study_sonmenu.on").parent().next().children("div").children("a").click();
                }
            }, 10000);
        }

    });
    // Your code here...
})();