您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
融优学堂自动刷课
当前为
// ==UserScript== // @name 融优学堂 // @namespace https://www.livedu.com.cn/ // @version 0.3 // @description 融优学堂自动刷课 // @author th1nk // @match *://*.livedu.com.cn/*/queryAllZjByKcdm.do // @match *://livedu.com.cn/*/queryAllZjByKcdm.do // @icon https://www.google.com/s2/favicons?sz=64&domain=livedu.com.cn // @grant none // @license AGPL-3.0 // ==/UserScript== (function () { 'use strict'; // Your code here... var _table_content = document.getElementsByClassName('curr-b-list') var current_studying = 0 var table_content_text = [] var table_content_onclick = [] function getTableContent() { //console.log("getTableContent"); for (const _element of _table_content) { var _content_tmp = _element.getElementsByTagName('dd') for (const _dd of _content_tmp) { var _content_a_template = _dd.getElementsByTagName('a') for (const _a_template of _content_a_template) { table_content_text.push(_a_template.innerText) table_content_onclick.push(_a_template) } } } } function getCurrentChapter() { //console.log("getCurrentChapter"); for (let index = 0; index < (table_content_text.length > table_content_onclick.length ? table_content_onclick.length : table_content_text.length); index++) { if (table_content_onclick[index].nextElementSibling.style.float == 'right' && table_content_onclick[index].nextElementSibling.outerText == '正在学习') { current_studying = index } } } function nextChapter() { //console.log("nextChapter"); if (table_content_onclick.length - 1 > current_studying) { current_studying++ table_content_onclick[current_studying].onclick.call() } setTimeout(() => { checkStatus() }, 3000); } function checkStatus() { //console.log("checkStatus"); var _sp = document.getElementById('zwshow').contentWindow.document.getElementById('sp_index_1') //console.log('_sp', _sp); if (_sp == null || _sp.outerText == '已完成') { nextChapter() } else if (_sp.outerText == '未完成') { startPlay() } } function startPlay() { //console.log("startPlay"); var _vi = document.getElementById('zwshow').contentWindow.document.getElementById('myVideo_1') console.log("_vi", _vi); if (_vi != null) { _vi.muted = true console.log("currentTime", _vi.currentTime); console.log("duration", _vi.duration); setTimeout(() => { var _interval = setInterval(function () { console.log(`${table_content_text[current_studying]} 当前进度${_vi.currentTime}/${_vi.duration}`); if (_vi.duration - _vi.currentTime < 1.5) { //console.log("清除定时器"); clearInterval(_interval) setTimeout(() => { _vi.play() nextChapter() }, 2000); } else { _vi.play() } const _vi_tmp = document.getElementById('zwshow').contentWindow.document.getElementById('myVideo_1') if (_vi_tmp != null && _vi_tmp != _vi) { _vi = _vi_tmp } }, 1000) }, 3000); } } getTableContent() getCurrentChapter() checkStatus() })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址