Greasy Fork

TOD🚀全平台网课助手【学习通 U校园ai 知到 英华 仓辉 雨课堂 职教云】【学起 青书 柠檬 睿学 慕享 出头科技 慕华】【国开 广开 上海开放大学】等平台 客服微信:WKWK796 自动刷课

🐯全网免费仅做一款脚本🐯】、【🚀已完美兼容、智慧树、中国大学mooc、慕课、雨课堂、新国开、超星、学习通、知到、国家开放大学、蓝墨云、职教云、智慧职教、云班课精品课、山东专技、西财在线剩余网站仅支持部分功能🚀】【半兼容、绎通云、U校园、学堂在线】、【😎完美应付测试,全自动答题,一键完成所有资源学习(视频挨个刷时长不存在滴)、视频倍速😎】、

目前为 2025-04-10 提交的版本。查看 最新版本

// ==UserScript==
// @name         TOD🚀全平台网课助手【学习通 U校园ai 知到 英华 仓辉 雨课堂 职教云】【学起 青书 柠檬 睿学 慕享 出头科技 慕华】【国开 广开 上海开放大学】等平台 客服微信:WKWK796  自动刷课
// @namespace    https://github.com/wkwk796
// @version      1.7.4
// @description  🐯全网免费仅做一款脚本🐯】、【🚀已完美兼容、智慧树、中国大学mooc、慕课、雨课堂、新国开、超星、学习通、知到、国家开放大学、蓝墨云、职教云、智慧职教、云班课精品课、山东专技、西财在线剩余网站仅支持部分功能🚀】【半兼容、绎通云、U校园、学堂在线】、【😎完美应付测试,全自动答题,一键完成所有资源学习(视频挨个刷时长不存在滴)、视频倍速😎】、
// @author       Wkwk796
// @match        *://*.chaoxing.com/*
// @match        *://*.zhihuishu.com/*
// @match        *://*.chaoxing.com/*
// @match        *://mooc1.chaoxing.com/nodedetailcontroller/*
// @match        *://*.chaoxing.com/mooc-ans/work/doHomeWorkNew*
// @match        *://*.chaoxing.com/work/doHomeWorkNew*
// @match        *://*.edu.cn/work/doHomeWorkNew*
// @match        *://*.asklib.com/*
// @match        *://*.chaoxing.com/*
// @match        *://*.hlju.edu.cn/*
// @match        *://lms.ouchn.cn/*
// @match        *://xczxzdbf.moodle.qwbx.ouchn.cn/*
// @match        *://tongyi.aliyun.com/qianwen/*
// @match        *://chatglm.cn/*
// @match        *://*.zhihuishu.com/*
// @match        *://course.ougd.cn/*
// @match        *://moodle.syxy.ouchn.cn/*
// @match        *://moodle.qwbx.ouchn.cn/*
// @match        *://elearning.bjou.edu.cn/*
// @match        *://whkpc.hnqtyq.cn:5678/*
// @match        *://study.ouchn.cn/*
// @match        *://www.51xinwei.com/*
// @match        *://*.w-ling.cn/*
// @match        *://xuexi.jsou.cn/*
// @match        *://*.edu-edu.com/*
// @match        *://xuexi.jsou.cn/*
// @match        *://spoc-exam.icve.com.cn/*
// @match        *://*.icve.com.cn/*
// @match        *://zice.cnzx.info/*
// @grant        unsafeWindow
// @grant        GM_xmlhttpRequest
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_info
// @grant        GM_addStyle
// @grant        unsafeWindow
// @grant        none
// @license      MIT
// @icon         https://static.zhihuishu.com/static/img/favicon.ico
// ==/UserScript==

(function() {
    'use strict';
    GM_addStyle(`
        #control-panel {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 99999;
            background: rgba(0,0,0,0.8);
            padding: 15px;
            border-radius: 8px;
            color: white;
            font-family: Arial;
        }
        .panel-title {
            font-size: 16px;
            margin-bottom: 10px;
            border-bottom: 1px solid #666;
            padding-bottom: 5px;
        }
        .contact-info {
            color: #00ff00;
            font-weight: bold;
        }
    `);

    // 创建控制面板
    const panel = document.createElement('div');
    panel.id = 'control-panel';
    panel.innerHTML = `
        <div class="panel-title">学习通自动刷课控制台</div>
        <div>状态:<span id="status">运行中</span></div>
        <div>技术支持:<span class="contact-info">wkwk796</span></div>
    `;
    document.body.appendChild(panel);

    function deepFindVideo() {
        try {
            // 处理多层iframe嵌套结构[citation:1][citation:5]
            let iframeChain = document.querySelector('iframe')
                .contentWindow.document.querySelectorAll('iframe');
            const targetWindow = iframeChain[0].contentWindow;
            
            const video = targetWindow.document.querySelector('video');
            if(video) {
                // 设置静音和倍速[citation:3][citation:7]
                video.muted = true;
                video.playbackRate = 2.0;
                
                // 防止暂停机制[citation:6]
                video.addEventListener('pause', () => video.play());
                
                // 自动播放处理
                if(video.paused) video.play();
                return true;
            }
        } catch(e) {
            console.log('DOM访问异常:', e);
        }
        return false;
    }

    function handleQuestions() {
        try {
            // 弹题自动处理逻辑[citation:1][citation:6]
            const iframe = document.querySelector('iframe').contentWindow
                .document.querySelector('iframe').contentWindow.document;
                
            const dialog = iframe.querySelector('.dialog-test');
            if(dialog) {
                const options = dialog.querySelectorAll('.topic-item');
                if(options.length > 0) {
                    options[0].click();  // 选择第一个选项
                    dialog.querySelector('.dialog-footer .btn').click();
                }
            }
        } catch(e) {}
    }

    // 主循环逻辑
    setInterval(() => {
        if(!deepFindVideo()) return;
        handleQuestions();
        
        // 进度检测与章节切换[citation:5][citation:7]
        const progress = document.querySelector('.vjs-play-progress');
        if(progress && progress.style.width === '100%') {
            document.querySelector('.orientationright').click();
        }
    }, 3000);

    // 防移出检测移除[citation:7]
    window.addEventListener('mousemove', e => e.stopImmediatePropagation(), true);
})();