// ==UserScript== // @name 【万能视频自动刷课时播放加速答题考试脚本】各类专业技术人员,教师,会计,医学继续教育公需课专业课····· // @version 1.0 // @description 【弘成教育学起plus】【国开在线】【各类继续教育】【各类教师培训】【各类会计】【Q2444349169】。 // @author 万能脚本 // @match http://www.gzjxjy.gzsrs.cn/*/* // @license MIT // @namespace https://greasyfork.org/users/1030542 // @downloadURL https://update.greasyfork.icu/scripts/460428/%E3%80%90%E4%B8%87%E8%83%BD%E8%A7%86%E9%A2%91%E8%87%AA%E5%8A%A8%E5%88%B7%E8%AF%BE%E6%97%B6%E6%92%AD%E6%94%BE%E5%8A%A0%E9%80%9F%E7%AD%94%E9%A2%98%E8%80%83%E8%AF%95%E8%84%9A%E6%9C%AC%E3%80%91%E5%90%84%E7%B1%BB%E4%B8%93%E4%B8%9A%E6%8A%80%E6%9C%AF%E4%BA%BA%E5%91%98%EF%BC%8C%E6%95%99%E5%B8%88%EF%BC%8C%E4%BC%9A%E8%AE%A1%EF%BC%8C%E5%8C%BB%E5%AD%A6%E7%BB%A7%E7%BB%AD%E6%95%99%E8%82%B2%E5%85%AC%E9%9C%80%E8%AF%BE%E4%B8%93%E4%B8%9A%E8%AF%BE%C2%B7%C2%B7%C2%B7%C2%B7%C2%B7.user.js // @updateURL https://update.greasyfork.icu/scripts/460428/%E3%80%90%E4%B8%87%E8%83%BD%E8%A7%86%E9%A2%91%E8%87%AA%E5%8A%A8%E5%88%B7%E8%AF%BE%E6%97%B6%E6%92%AD%E6%94%BE%E5%8A%A0%E9%80%9F%E7%AD%94%E9%A2%98%E8%80%83%E8%AF%95%E8%84%9A%E6%9C%AC%E3%80%91%E5%90%84%E7%B1%BB%E4%B8%93%E4%B8%9A%E6%8A%80%E6%9C%AF%E4%BA%BA%E5%91%98%EF%BC%8C%E6%95%99%E5%B8%88%EF%BC%8C%E4%BC%9A%E8%AE%A1%EF%BC%8C%E5%8C%BB%E5%AD%A6%E7%BB%A7%E7%BB%AD%E6%95%99%E8%82%B2%E5%85%AC%E9%9C%80%E8%AF%BE%E4%B8%93%E4%B8%9A%E8%AF%BE%C2%B7%C2%B7%C2%B7%C2%B7%C2%B7.meta.js // ==/UserScript== const page = (pathname) => { return new Promise(resolve => { const timer = setInterval(() => { if (pathname[0] === '/') { if (location.href.includes(pathname)) { clearInterval(timer) resolve() } } else { if (location.href.includes(pathname)) { clearInterval(timer) resolve() } } }, 300) }) } document.querySelector('video').defaultPlaybackRate = 3.0;//设置默认三倍速播放 document.querySelector('video').play(); const getElement = (selector) => { return new Promise(resolve => { const timer = setInterval(() => { const element = typeof selector === 'string' ? document.querySelector(selector) : selector if (element) { clearInterval(timer) resolve(element) } }, 60) }) } page('/personback/#/learning').then(() => { getElement('video').then(video => { video.muted = true const playList = Array.from(document.querySelectorAll('.el-steps .el-step .title-step')) let currentIndex = 0 const nextVideo = () => { let currentNow = Date.now() const timer = setInterval(async () => { if (isNaN(video.duration)) { video = await getElement('video') video.muted = true } if (Date.now() - currentNow < 15000) { if (video.paused) { video.play() } return } if (video.currentTime >= (video.duration - 1) && video.paused) { currentIndex += 1 if (currentIndex >= playList.length) { currentIndex = 0 } playList[currentIndex].click() clearInterval(timer) setTimeout(() => { nextVideo() }, 1000) } }, 1000) } setInterval(() => { const button = document.querySelector('.el-dialog__wrapper .el-button span') if (button) { button.click() } }, 1000) nextVideo() }) })