Greasy Fork is available in English.
每隔1秒检测并移除指定div,然后200ms后点击播放按钮
// ==UserScript==
// @name 超星学习通 反黑屏暂停随堂检测 反检测刷课
// @namespace http://tampermonkey.net/
// @version 1.2
// @description 每隔1秒检测并移除指定div,然后200ms后点击播放按钮
// @match https://*.chaoxing.com/*
// @run-at document-idle
// @grant none
// @author kaesinol
// @license MIT
// ==/UserScript==
(function () {
'use strict';
const selectorDiv = '.x-container.ans-timelineobjects.x-container-default';
const selectorBtn = 'button.vjs-play-control.vjs-control.vjs-button.vjs-paused';
setInterval(() => {
const divs = document.querySelectorAll(selectorDiv);
if (divs.length > 0) {
divs.forEach(div => div.remove());
console.log(`[remove-ans] removed ${divs.length} node(s)`);
}
setTimeout(() => {
const btn = document.querySelector(selectorBtn);
if (btn) {
btn.click();
console.log('[remove-ans] clicked play button');
} else {
console.log('[remove-ans] play button not found');
}
}, 200);
}, 1000);
})();