Greasy Fork

来自缓存

Greasy Fork is available in English.

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

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

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         TOD🚀全平台网课助手【学习通 U校园ai 知到 英华 仓辉 雨课堂 职教云】【学起 青书 柠檬 睿学 慕享 出头科技 慕华】【国开 广开 上海开放大学】等平台 客服微信:WKWK796  自动刷课
// @namespace    https://github.com/wkwk796
// @version      3.2.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';

    let autoPlayEnabled = true;
    let playbackRate = 2.0;

    // 创建控制面板
    function createControlPanel() {
        const panel = document.createElement('div');
        panel.style.cssText = `
            position: fixed; bottom: 20px; right: 20px; z-index: 99999;
            background: rgba(0,0,0,0.85); color: #0f0; padding: 12px 16px;
            border-radius: 8px; font-family: Arial, sans-serif; font-size: 14px;
            box-shadow: 0 0 15px rgba(0,255,0,0.5); width: 220px; border: 1px solid #0f0;
        `;

        panel.innerHTML = `
            <div style="margin-bottom:8px;font-weight:bold;color:#0f0;">学习通自动播放控制面板</div>
            <button id="cx-toggle" style="background:#0f0;color:#000;border:none;padding:6px 10px;margin:4px 0;width:100%;border-radius:4px;cursor:pointer;">✅ 自动播放已开启</button>
            <div style="margin:8px 0;">
                <label>倍速: <span id="cx-rate">${playbackRate}</span>x</label>
                <input type="range" id="cx-rate-slider" min="1" max="2" step="0.25" value="${playbackRate}" style="width:100%;">
            </div>
            <button id="cx-next" style="background:#0066ff;color:#fff;border:none;padding:6px 10px;margin:4px 0;width:100%;border-radius:4px;cursor:pointer;">手动下一节</button>
            <div style="margin-top:10px;font-size:12px;color:#aaa;text-align:center;">
                联系作者:<span style="color:#0ff;">wkwk796</span>
            </div>
        `;

        document.body.appendChild(panel);

        // 按钮事件
        document.getElementById('cx-toggle').addEventListener('click', () => {
            autoPlayEnabled = !autoPlayEnabled;
            const btn = document.getElementById('cx-toggle');
            btn.textContent = autoPlayEnabled ? '✅ 自动播放已开启' : '❌ 自动播放已关闭';
            btn.style.background = autoPlayEnabled ? '#0f0' : '#f00';
        });

        const slider = document.getElementById('cx-rate-slider');
        slider.addEventListener('input', () => {
            playbackRate = parseFloat(slider.value);
            document.getElementById('cx-rate').textContent = playbackRate;
        });

        document.getElementById('cx-next').addEventListener('click', () => {
            nextTaskPoint();
        });
    }

    // 强制播放视频
    function forcePlayVideo() {
        if (!autoPlayEnabled) return;

        const videos = document.querySelectorAll('video');
        videos.forEach(video => {
            if (video) {
                video.muted = true;
                video.playbackRate = playbackRate;
                if (video.paused) {
                    video.play().catch(() => {});
                }
            }
        });
    }

    // 监听暂停并强制播放
    function preventPause() {
        const videos = document.querySelectorAll('video');
        videos.forEach(video => {
            video.addEventListener('pause', () => {
                if (autoPlayEnabled) {
                    setTimeout(() => {
                        video.play().catch(() => {});
                    }, 300);
                }
            });
        });
    }

    // 自动点击下一节 / 下一个任务点
    function nextTaskPoint() {
        // 常见下一节按钮选择器(根据2025-2026学习通界面调整)
        const nextSelectors = [
            '.next', '.next-button', '.btn-next', 
            'button:contains("下一节")', 'a:contains("下一节")',
            '.xt_next', '.chapter-next', '.task-next'
        ];

        for (let sel of nextSelectors) {
            const btn = document.querySelector(sel);
            if (btn) {
                btn.click();
                return;
            }
        }

        // 尝试点击未完成的任务点
        const unfinished = document.querySelectorAll('.taskpoint:not(.finished), .unfinish');
        if (unfinished.length > 0) {
            unfinished[0].click();
        }
    }

    // 监控视频结束
    function monitorVideoEnd() {
        setInterval(() => {
            const videos = document.querySelectorAll('video');
            videos.forEach(video => {
                if (video && !video.paused && video.currentTime > 0) {
                    if (Math.abs(video.duration - video.currentTime) < 2) {  // 快结束时
                        setTimeout(() => {
                            nextTaskPoint();
                        }, 1500);
                    }
                }
            });
        }, 3000);
    }

    // 主循环
    function mainLoop() {
        forcePlayVideo();
        preventPause();
    }

    // 初始化
    function init() {
        createControlPanel();
        monitorVideoEnd();

        // 每500ms检查一次
        setInterval(mainLoop, 500);

        // 页面变化时重新绑定
        const observer = new MutationObserver(() => {
            preventPause();
        });
        observer.observe(document.body, { childList: true, subtree: true });

        console.log('✅ 学习通自动播放脚本已加载(联系:wkwk796)');
    }

    // 启动
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', init);
    } else {
        init();
    }
})();