// ==UserScript== // @name 云上全平台🦄️支持自动答题|题库搜|刷资源|刷视频|视频加速|快速背题|AI搜题|AI问答|自动刷课--需使请用扫描下方二维馬问客服 // @namespace https://github.com/wkwk796 // @version 1.2.3 // @description 🐯全网免费仅做一款脚本🐯】、【🚀已完美兼容、智慧树、中国大学mooc、慕课、雨课堂、新国开、超星、学习通、知到、国家开放大学、蓝墨云、职教云、智慧职教、云班课精品课、山东专技、西财在线剩余网站仅支持部分功能🚀】【半兼容、绎通云、U校园、学堂在线】、【😎完美应付测试,全自动答题,一键完成所有资源学习(视频挨个刷时长不存在滴)、视频倍速😎】、 // @author Wkwk796 // @match *://*.chaoxing.com/* // @match *://*.zhihuishu.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 // @license MIT // @icon https://static.zhihuishu.com/static/img/favicon.ico // @downloadURL none // ==/UserScript== (function() { 'use strict'; // 开发者联系方式 const contactInfo = { wechat: 'wkwk796', email: 'wkwk796@example.com', website: 'https://github.com/wkwk796' }; // 初始化配置 const config = { videoSpeed: 2.0, // 视频播放倍速 autoPlayNext: true, // 自动下一节 muteVideo: true, // 静音播放 autoAnswer: true, // 自动答题 debugMode: false // 调试模式 }; // 创建控制面板 function createControlPanel() { const panel = document.createElement('div'); panel.style = 'position:fixed;top:20px;right:20px;background:#fff;padding:15px;box-shadow:0 0 10px rgba(0,0,0,0.2);z-index:9999;min-width:280px;'; panel.innerHTML = `

全平台学习助手

开发者微信:${wkwk796}
版本:v${GM_info.script.version}
`; document.body.appendChild(panel); // 保存配置 document.getElementById('saveBtn').addEventListener('click', () => { config.autoPlayNext = document.getElementById('autoPlayCheck').checked; config.muteVideo = document.getElementById('muteCheck').checked; config.videoSpeed = parseFloat(document.getElementById('speedInput').value); GM_setValue('config', config); showToast('配置已保存!'); }); } // 处理视频元素 function handleVideo(video) { if (!video) return; // 设置播放速度 video.playbackRate = config.videoSpeed; // 设置静音 video.muted = config.muteVideo; // 自动播放处理 const playVideo = () => { if (video.paused) { video.play().catch(() => { video.muted = true; video.play(); }); } }; // 立即尝试播放 playVideo(); // 定时检测播放状态 const playInterval = setInterval(playVideo, 3000); // 自动下一章 video.addEventListener('ended', handleVideoEnd); video.addEventListener('timeupdate', handleTimeUpdate); // 清理定时器 video.addEventListener('pause', () => clearInterval(playInterval)); video.addEventListener('abort', () => clearInterval(playInterval)); } // 处理视频结束 function handleVideoEnd() { if (config.autoPlayNext) { const nextBtn = findNextButton(); if (nextBtn) { setTimeout(() => { nextBtn.click(); showToast('正在跳转下一节...'); }, 3000); } } } // 处理时间更新(提前3秒准备跳转) function handleTimeUpdate() { if (config.autoPlayNext) { const video = document.querySelector('video'); if (video && video.duration - video.currentTime < 3) { const nextBtn = findNextButton(); if (nextBtn && !nextBtn.disabled) { nextBtn.click(); showToast('检测到即将结束,自动跳转...'); } } } } // 查找下一章按钮 function findNextButton() { const selectors = [ '.nextBtn', '.next-button', '.vjs-next-button', '.btn-next' ]; return document.querySelector(selectors.join(',')); } // 显示操作提示 function showToast(text) { const toast = document.createElement('div'); toast.textContent = text; toast.style = `position:fixed;bottom:20px;left:50%;transform:translateX(-50%); background:rgba(0,0,0,0.8);color:#fff;padding:8px 16px;border-radius:4px; z-index:10000;font-size:14px;`; document.body.appendChild(toast); setTimeout(() => toast.remove(), 2000); } // 初始化脚本 function init() { // 加载配置 const savedConfig = GM_getValue('config'); if (savedConfig) Object.assign(config, savedConfig); // 创建控制面板 createControlPanel(); // 平台检测 const isChaoxing = window.location.host.includes('chaoxing'); const isZhihuishu = window.location.host.includes('zhihuishu'); // 视频处理 const videoObserver = new MutationObserver(mutations => { if (document.querySelector('video')) { handleVideo(document.querySelector('video')); videoObserver.disconnect(); } }); videoObserver.observe(document.body, { childList: true, subtree: true }); // 自动答题(仅学习通) if (isChaoxing && config.autoAnswer) { const answerObserver = new MutationObserver(() => { document.querySelectorAll('.answerOption').forEach(btn => { if (btn.innerText.includes('正确') && !btn.classList.contains('selected')) { btn.click(); } }); }); answerObserver.observe(document.body, { childList: true, subtree: true }); } // 调试信息 if (config.debugMode) { console.log(`%c脚本已启动!问题反馈微信:${contactInfo.wechat}`, 'color:white; background:#1890ff; padding:4px 8px; border-radius:4px;'); } } // 延迟启动确保DOM加载 setTimeout(init, 1500); })();