公需课自动化学习教程(快速)油猴安装
来源:网络转载
发布时间:2021-06-20 08:00:00
查看次数:
需要条件:
如果之前有使用过类似的加速类的就不需要下载第1步和第2步。1、谷歌浏览器 Chrome 、【其实其他浏览器只要是Chromium内核浏览器都是可以的、如360浏览器、QQ浏览器等】
推荐使用win10 自带的Microsoft Edge浏览器
https://www.tampermonkey.net
或者
https://chrome.zzzmh.cn/info?token=gcalenpjmijncebpfijmoaglllgpjagf
或者
3、安装公需课脚本,添加以下脚本,确定启用就可以了。(可以免操作,但是不能快速。)
// ==UserScript==
// @name 蓝天教育基础教育教师培训dconline
// @match https://v3.lt-edu.net/*
// @match https://v3.dconline.net.cn/*
// @match https://jstsgc.gdedu.gov.cn/*
// @match https://preview.dccloud.com.cn/*
// @grant none
// @license MPL
// ==/UserScript==
window.onload = function(){
do_see()
setTimeout(refresh,5000 * 60);
}
function refresh(){
let hre = location.href;
if (hre.includes("https://v3.dconline.net.cn/student.html#/index/classStudy")) {
flag_choose_item = false
location.reload(true);
}
}
function click_item(){
console.log("click_item")
var enter = 'body > div.el-message-box__wrapper > div > div.el-message-box__btns > button.el-button.el-button--default.el-button--small.el-button--primary';
if(document.querySelector(enter)){
document.querySelector(enter).click();
}
}
function watch(){
let hre = location.href;
if (hre.includes("https://v3.dconline.net.cn/student.html#/index/classStudy")) {
console.log("watch")
try {
document.querySelector("video").play();
document.querySelector("video").volume = 0;
document.querySelector("video").playbackRate = 1;
} catch (error) {setTimeout(watch, 500)}
}
}
function sleep(delay) {
for(var t = Date.now(); Date.now() - t <= delay;);
}
var listLen = 0;
function getListCount(){
let t = 0;
if(document.getElementsByClassName('mb18 mt18 pr video')[document.getElementsByClassName('mb18 mt18 pr video').length - 1].childNodes[1].firstChild.children[0])
{
try{
t = document.getElementsByClassName('mb18 mt18 pr video')[document.getElementsByClassName('mb18 mt18 pr video').length - 1].childNodes[1].firstChild.children[0].childElementCount;
}catch(error){setTimeout(listLen = getListCount(), 3000);}
}
return t;
}
var flag_choose_item = false;
function choose(){
console.log("choose")
try{
listLen = getListCount();
for(var i = 0; i < listLen; i++){
var chooseNum;
if((chooseNum = document.getElementsByClassName('mb18 mt18 pr video')[document.getElementsByClassName('mb18 mt18 pr video').length - 1].childNodes[1].firstChild.children[0].children[i].firstChild)){
let videoStatus = chooseNum.children[2].className;
if(videoStatus != 'video-status success'){
if(chooseNum.children[1].className != 'el-icon-video-play el-icon el-icon-video-pause'){
if(!flag_choose_item){
chooseNum.children[1].click();
click_item();
flag_choose_item = true;
}
}else{
flag_choose_item = false;
}
break;
}
}
}
}catch (error) {
setTimeout(choose, 1000);
}
}
var project_flag = false;
function clickProject(){
let hre = location.href;
try{
if(hre.includes("https://v3.dconline.net.cn/student.html#/index/home")){
if(document.getElementsByClassName('training-projectsButton')[0]){
project_flag = true;
document.getElementsByClassName('training-projectsButton')[0].click();
}
else{
setTimeout(clickProject, 1000);
}
}
}catch(error){
setTimeout(clickProject, 1000);
}
}
var len;
function getLenCount(){
let t = 0;
try{
t = document.getElementsByClassName('el-tree menuList_warp')[0].childElementCount - 1;
}catch(error){setTimeout(listLen = getLenCount(), 3000);}
return t;
}
function close_project(){
let hre = location.href;
if (hre.includes("https://v3.dconline.net.cn/student.html#/project/index")){
//window.open("about:blank","_self").close()
}else{
setTimeout(close_project, 300);
}
}
function click_study(i){
if(document.getElementsByClassName('project-courseButton')[i]){
document.getElementsByClassName('project-courseButton')[i].click();
}
}
var flag_choose = false;
function choose_study(){
console.log("choose_study")
let hre = location.href;
if (hre.includes("https://v3.dconline.net.cn/student.html#/project/index")) {
try{
var project_main = document.getElementsByClassName('project-course');
var project_main_len = project_main.length
if(project_main.length == 0){
setTimeout(choose_study, 1000);
return
}
sleep(1)
let cnt = 0;
for(var i = 0; i < project_main_len; i++){
let project = project_main[i]
let studyLen = project.childElementCount
for(var j = 0;j < studyLen; j++){
let studyProject = project.children[j].children[1].firstChild.children[1]
let studyStatus = studyProject.textContent
if(studyStatus != '已学习'){
if(!flag_choose){
click_study(cnt);
close_project();
flag_choose = true;
}
break;
}
cnt++;
}
if(flag_choose){
break;
}
}
}catch(error){}
}
}
function readPaper(){
let hre = location.href;
if(document.getElementsByClassName('file-box-content')){
let bookLen = document.getElementsByClassName('file-box-content').length;
for(var i = 0; i < bookLen; i++){
let bookNode = document.getElementsByClassName('file-box-content')[i];
if(bookNode.children[1].textContent != '( 已完成 )'){
bookNode.lastChild.click();
}
}
}
}
function lop(){
console.log("lop")
let hre = location.href;
if (hre.includes("https://v3.dconline.net.cn/student.html#/index/classStudy")) {
try{
len = getLenCount();
for (let i = 0; i < len; i++){
var treeProject = document.getElementsByClassName('nav_menu')[i];
let isStudy = treeProject.firstChild.title
if(isStudy == '已学习' && i == len - 1){
flag_choose = false;
window.open('https://v3.dconline.net.cn/student.html#/project/index', '_self');
do_see()
}
if(isStudy == '已学习'){
continue;
}
let nowStudy = treeProject.children[1].className
if(nowStudy == 'beyondConcealment ellipsis active'){
readPaper();
break;
}else{
treeProject.click();
break;
}
}
choose();
}catch(error){
setTimeout(lop, 1000);
}
}
}
function do_see() {
console.log("do_see")
//视频播放页
let hre = location.href;
if(hre.includes("https://v3.dconline.net.cn/student.html#/index/home")){
if(!project_flag){
clickProject()
}
}else if (hre.includes("https://v3.dconline.net.cn/student.html#/index/classStudy")) {
setTimeout(click_item,1500); //300 毫秒
setTimeout(lop, 3000);
setTimeout(watch,1000)
}else if (hre.includes("https://v3.dconline.net.cn/student.html#/project/index")) {
if(!flag_choose){
choose_study()
}else{
return
}
}
setTimeout(do_see, 1000)
}
- 相关文章
- ·2019-2020衡水中学校长开学演讲09-01·认识应试教育的政治正确性!05-05·如何维持班级浓厚学风,助力学生赢得期末?01-01·让你人生豁然开朗的28个“神回答”03-30·中小学各科在线学习资源02-04·不能让集体备课衍生成折腾教师的又一形式主义04-09·中小学教师生存现状挥泪解析……03-07·108个容易误解的成语,你用对地方了么?08-13
- 最新文章
- ·趣配音 ︱英语教师日常之 宝娟 我的嗓子03-23·读完《认知觉醒》,我浓缩了15句精华03-10·英语考试型选手的自述109到14702-28·2024,一位教师的新期待02-15·微信新增的这7个小功能,大有用处!01-10·联合国秘书长古特雷斯2024新年致辞!01-05·抓学困生,就是抓教学成绩01-02·做一个有温度的班主任01-01·如何维持班级浓厚学风,助力学生赢得期末?01-01·这些万能评课用语我爱了01-01
- 阅读排行
- ·印度乘法口诀09-21·我们为什么要上学?04-03·人人都可以指使老师08-13·教练技术到底学什么?09-17·透过衡中现象对高中教育的一点思考10-15·值得阅读的10本英文畅销书,你读过几本?12-05·左右人生命运的黄金定律04-23·大数据带给我们什么?03-15·没有哪次选择不重要,也没有哪次能决定你的一生07-31·三种非常奥妙的钱10-11
点击这里识别二维码关注公众号