学起Plus自动刷课

用于弘成学起Plus自动刷课

目前为 2022-11-19 提交的版本。查看 最新版本

// ==UserScript==
// @name         学起Plus自动刷课
// @namespace    https://yaw.ee/
// @version      0.1
// @description  用于弘成学起Plus自动刷课
// @author       Yawee
// @match        *://nuccj.sccchina.net/*
// @match        *://*.chinaedu.net/*
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
// @connect      chinaedu.net
// @icon         https://pp.myapp.com/ma_icon/0/icon_53875840_1667990262/256
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    $(() => {
        console.log('加载成功');
        var yaweeBtn = '<div id="yawee" style="position:fixed;top:0;left:0;right:0;width:100%;height:50px;line-height:50px;text-align:center;margin:auto;border-radius:0 0 10px 10px;background:#2196f3;color:#fff">点击此处开启自动刷课</div>';
        $('#videoFrame').append(yaweeBtn);
        $('#draggable').children('#video').append(yaweeBtn);
        $('#yawee').on('click',function(){
            $(this).css('background','#4caf50').text('已开启自动刷课');
            document.getElementById('videoFrame_video_html5_api').play();
        })
        //去除弹窗
        $('#pop,#cover').hide();
        setTimeout(() => {
            $('#frameVideo').attr('allow','autoplay');
            $('#videoFrame_video_html5_api').attr('muted','');
            $(".vjs-big-play-button")[0].click();
            document.getElementById('videoFrame_video_html5_api').play();
            //5s点击一次播放按钮
            var int=self.setInterval("document.getElementById('videoFrame_video_html5_api').play();",5000);
        },1000);
    })
})();