当前脚本支持课程视频播放完成,自动跳转下一小节,章节测试自动跳过,后台播放防止视频暂停。
使用过程中遇到问题,可以反馈给我。qq:1877288470
免责申明
该脚本仅用于学习研究使用,请勿用于违法行为,后果自负。
// ==UserScript== // @name 学习通刷课助手-自动静音,防止鼠标移出暂停,章节结束自动跳转下一节 // @namespace http://tampermonkey.net/ // @version 0.0.5 // @description 学习通课程自动挂机,当前脚本支持课程视频播放完成,自动跳转下一小节,章节测试自动跳过,后台播放防止视频暂停。 // @author Sweek // @match *://*.chaoxing.com/* // @license GPLv3 // @icon https://www.google.com/s2/favicons?sz=64&domain=csdn.net // @grant unsafeWindow // @grant GM_addStyle // @grant GM_setValue // @grant GM_getValue // @require https://code.jquery.com/jquery-2.1.4.min.js // @downloadURL none // ==/UserScript== // 定义全局变量 let currentTime = null // 当前视频当前播放节点 let duration = null // 当前视频总长度 let progress = null // 当前视频播放进度 let playbackRate = 1 // 当前视频播放倍速 // 课程章节相关数据 let courseName = null // 当前课程名称 let chapterInfo = [] // 当前课程所有章节数据 let currentChapterId = null // 当前所在章节id let currentChapterName = null // 当前所在章节名称 let allChapterName = [] // 所有章节名称 let currentChapterTabArr = [] // 当前页面所有的分栏 let currentChapterTabName = '' // 当前页面激活的分栏名称 let videoProgressId = '' // 定时监听页面内容监听事件 // 获取当前页面的 URL url = '' chapterId = '' // 页面样式 var popCSs = ` #my-window { position: fixed; top: 5px; left: 20px; width: 300px; height: auto; background-color: rgba(247, 247, 247, 1); border: 1px solid #fff; border-radius: 5px; z-index: 9999; overflow: hidden; } #my-window .header { background-color: #4497fa; color: #fff; padding: 5px; font-size: 16px; font-family: 'fangsong'; font-weight: bold; border-radius: 5px; cursor: move; height: 25px; width: 300px; } #my-window .content { width: 300px; height: 500px; } #my-window .content .content-title { height: 22px; width: 280px; background-color: #dadada; line-height: 22px; padding-left: 5px; font-size: 12px; font-family: 'fangsong'; font-weight: 600; boder-radius: 5px; border-left: 4px solid #2196f3; border-right: 4px solid #dadada; margin-top: 5px; } #my-window .content .content-notice { height: 80px; width: 280px; overflow: auto; border: 1px solid gray; border-radius: 5px; padding: 5px; margin-top: 5px; } #my-window .content .content-process { height: 60px; width: 280px; overflow: auto; border: 1px solid gray; border-radius: 5px; padding: 5px; margin-top: 5px; } #my-window .content .content-log { height: 120px; width: 280px; overflow: auto; border: 1px solid gray; border-radius: 5px; padding: 5px; margin-top: 5px; } #my-window .content .content-set { height: 55px; width: 280px; overflow: auto; border: 1px solid gray; border-radius: 5px; padding: 5px; margin-top: 5px; } #my-window .resizer { position: absolute; bottom: 0; right: 0; width: 20px; height: 20px; background-color: #2196f3; cursor: se-resize; border-radius: 0px; z-index: 1; } #hide-btn { height: 25px; width: auto; float: right; margin-right: 10px; background-color: #fff; border: 1px solid gray; border-radius: 5px; font-size: 12px; padding: 0 5px; font-family: 'fangsong'; } #hide-btn:active { background-color: #4497fa; } ` // 页面Html var popHtml = `
当前脚本支持课程视频播放完成,自动跳转下一小节,章节测试自动跳过,后台播放防止视频暂停。
使用过程中遇到问题,可以反馈给我。qq:1877288470
免责申明
该脚本仅用于学习研究使用,请勿用于违法行为,后果自负。
[' + _time + ']' + '
' + '播放进度:' + val1 + '
' + '视频长度:' + val2 + 's' + '/' +val3 + 's' + '
'; _process.innerHTML = newContent; } // 页面通知提示 function notify(text, time) { // 创建通知元素 var notification = document.createElement('div'); notification.className = 'notification'; // 设置通知内容 notification.innerHTML = '' + text + '
[' + _time + ']' + str + '