学起Plus自动刷课

用于弘成学起Plus自动刷课

当前为 2022-11-19 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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);
    })
})();