返回首頁 

天津继续医学教育培训快速8倍速刷-好医生

秒播+自动答题 (继续医学教育培训)


Install this script?
// ==UserScript==// @name         天津继续医学教育培训快速8倍速刷-好医生// @namespace    http://www.31ho.com/// @version      1.0// @description  秒播+自动答题 (继续医学教育培训)// @author       keke31h// @match        https://tjsjxyxjy.cme#####.net/*// @match        *://*.cme#####.net/cme/*// @match        http://tjs.cme#####.net/*// @match        cme.haoyisheng.com/cme/*// @icon         ttps://www.google.com/s2/favicons?sz=64&domain=greasyfork.org// @grant        none// @license MIT// ==/UserScript==(function() {'use strict';// 定义一个函数来处理video元素function handleVideo() {var videoElements = document.querySelectorAll('video');videoElements.forEach(function(video) {video.muted = true;               // 设置视频为静音video.playbackRate = 8;          // 设置视频播放速度为8倍速if (video.duration > 3) {video.currentTime = video.duration - 3; // 如果视频时长大于3秒,跳转到视频的最后3秒}});}// 定义一个函数来处理input元素function handleInput() {var elements = document.querySelectorAll('input[type="radio"][value="1"]');elements.forEach(function(element) {element.checked = true;console.log('检测到符合条件的单选按钮并已选中');});}// 初始调用,以处理当前已加载的元素handleVideo();handleInput();// 创建一个MutationObserver来监听DOM的变化var observer = new MutationObserver(function(mutations) {mutations.forEach(function(mutation) {if (mutation.type === 'childList') {// 如果是子节点的添加或删除,检查是否有新的video或input元素mutation.addedNodes.forEach(function(node) {if (node.tagName === 'VIDEO') {handleVideo(); // 如果有新的video元素,调用handleVideo函数}if (node.tagName === 'INPUT' && node.type === 'radio' && node.value === '1') {handleInput(); // 如果有新的符合条件的input元素,调用handleInput函数}});}});});// 配置MutationObserver的选项var observerConfig = {childList: true,subtree: true};// 将observer应用到document.body,以监控整个文档的DOM变化observer.observe(document.body, observerConfig);// 定时器,用于处理可能在页面加载后动态添加的video元素setInterval(handleVideo, 5000);})();