您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
自动挂机看尔雅MOOC,支持后台、切换窗口不暂停,视频自动切换,屏蔽视频内的题目,倍速播放、进度条拖动、快进快退
当前为
// ==UserScript== // @name 超星网课助手(测试版) // @namespace [email protected] // @version 0.0.24 // @description 自动挂机看尔雅MOOC,支持后台、切换窗口不暂停,视频自动切换,屏蔽视频内的题目,倍速播放、进度条拖动、快进快退 // @author wyn665817 // @match *://*.chaoxing.com/ananas/modules/video/index.html* // @run-at document-end // @grant unsafeWindow // @license MIT // ==/UserScript== // 设置修改后,需要刷新或重新打开网课页面才会生效 var setting = { // 1代表开启,0代表关闭 video: 1 // 无法关闭,此版本中该参数不支持修改 // 仅开启video时,修改此处才会生效 ,line: '公网1' // 视频播放的默认资源线路,默认'公网1' ,http: '' // 视频播放的默认清晰度,默认'' ,muted: 0 // 视频静音播放,此功能在视频开始播放时调整音量至静音,默认关闭 ,drag: 0 // 倍速播放、进度条拖动、快进快退,使用此功能会出现不良记录(慎用),默认关闭 }, _self = unsafeWindow, $ = _self.$ || top.$; var $video = $('.ans-job-icon + iframe[src*="/video/index.html"]', parent.document), $job = $video.not('.ans-job-finished > iframe'); setting.tip = false; if (!$job.length) { } else if ($job[0] == frameElement) { setting.tip = true; } else { setInterval(function() { if ($video.not('.ans-job-finished > iframe')[0] == frameElement) { location.reload(); } }, setting.time); } alert(setting.tip ? 'ok' : 'no'); var vj = _self.ans.VideoJs.prototype, Hooks = vj.params2VideoOpt; vj.params2VideoOpt = function () { var config = Hooks.apply(this, arguments), line = config.playlines.findIndex(function(currentValue) { return currentValue.label == setting.line; }), http = config.sources.find(function(currentValue) { return currentValue.label == setting.http; }); console.log('信息:前', config.autoplay); config.playlines.unshift(config.playlines[line]); config.playlines.splice(line + 1, 1); config.plugins.videoJsResolutionSwitcher.default = http ? http.res : 360; config.plugins.studyControl.enableSwitchWindow = 1; config.plugins.timelineObjects.url = '/richvideo/initdatawithviewer?'; config.autoplay = setting.tip; setting.muted && (config.muted = true); if (setting.drag) { config.plugins.seekBarControl.enableFastForward = 1; config.playbackRates = [1, 1.25, 1.5, 2]; } console.log('信息:后', config.autoplay); vj.params2VideoOpt = Hooks; return config; };