Greasy Fork is available in English.
自动播放下一集,自动二倍速度
当前为
// ==UserScript==
// @name 重庆继续教育选修小节自动播放
// @namespace http://tampermonkey.net/
// @version 0.4
// @description 自动播放下一集,自动二倍速度
// @author moxiaoying
// @match https://cqrl.21tb.com/els/html/courseStudyItem/courseStudyItem.learn.do*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const iframe = document.getElementsByClassName('url-course-content').aliPlayerFrame.contentWindow;
setInterval(function(){
let next_button = iframe.document.body.getElementsByClassName('next-button');
if(next_button.length!=0){
next_button[0].click();
}
console.log('检测是否播放完毕');
},0.5*60*1000);
setTimeout(function(){
let ul = iframe.document.body.getElementsByClassName('rate-list');
if(ul.length!=0){
ul[0].getElementsByTagName('li')[0].click();//设置2倍数
console.log('设置2倍数');
}
},0.1*60*1000);
// Your code here...
})();