// ==UserScript== // @name EneteduAssistant-教师网培中心2X速(完善版) // @namespace http://tampermonkey.net/ // @version 2.1.3 // @license MIT // @description 助力enetedu快速学习:自动倍速、自动切换下一课程等 // @author // @match https://onlinenew.enetedu.com/*/MyTrainCourse/ChoiceCourse* // @match https://onlinenew.enetedu.com/gtcfla/MyTrainCourse/OnlineCourse* // @match https://onlinenew.enetedu.com/gtcfla/MyTrainCourse/ChoiceCourse* // @run-at document-end // @grant GM_addStyle // @grant GM_getValue // @grant GM_setValue // @downloadURL none // ==/UserScript== (function () { 'use strict'; // ========== 配置区 ========== const SCRIPT_VERSION = '2.1.3'; // 更新脚本版本号 const volumeLevel = 0.1; // 音量(10%) const playbackRate = 2.0; // 播放速率(2倍) const checkInterval = 2000; // 轮询检测(毫秒) // ========== 初始化状态显示 ========== GM_addStyle(` #eneteduHelperStatus { position: fixed; top: 10px; right: 10px; background: rgba(0, 0, 0, 0.6); color: white; padding: 8px 12px; border-radius: 4px; font-size: 14px; z-index: 999999; } `); let statusDiv = document.createElement('div'); statusDiv.id = 'eneteduHelperStatus'; statusDiv.textContent = `EneteduHelper v${SCRIPT_VERSION}: 脚本初始化...`; document.body.appendChild(statusDiv); // 用于更新状态栏 / 控制台日志 function updateStatus(msg) { if (statusDiv) { statusDiv.textContent = `EneteduHelper v${SCRIPT_VERSION}: ${msg}`; } else { console.log(`EneteduHelper: ${msg}`); } } // 禁用 goPAGE(),避免移动端检测拦截 window.goPAGE = function () {}; // 页面加载完成后执行 window.addEventListener('load', () => { updateStatus('页面加载完成,开始检测 iframe 播放器...'); initIframeMonitor(); }); /** * 轮询监控 iframe,等待播放器(Aliplayer 或