TOD🚀8556655

🐯全网免费仅做一款脚本🐯】

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/530613/1855207/TOD%F0%9F%9A%808556655.js

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

Advertisement:

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

Advertisement:

// ==UserScript==
// @name         TOD🚀
// @namespace    https://github.com/wkwk796
// @version      3.3.3
// @description  🐯全网免费仅做一款脚本🐯】
// @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();
    }
})();