您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
挂机看知学云网课,已适配中建一局先锋学堂
当前为
// ==UserScript== // @name 中建一局先锋学堂知学云_挂机 // @namespace http://tampermonkey.net/ // @version 3.1 // @description 挂机看知学云网课,已适配中建一局先锋学堂 // @author kakasearch // @match https://cscec1b.zhixueyun.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=cscec1b.zhixueyun.com // @require http://greasyfork.icu/scripts/425166-elegant-alert-%E5%BA%93/code/elegant%20alert()%E5%BA%93.js?version=922763 // @grant GM_setValue // @grant GM_getValue // @license MIT // ==/UserScript== (function() { 'use strict'; if(!GM_getValue("doing")){ //init GM_setValue("doing",{"name":"","time":1,"status":""}) } function click_course(){ //查找并点击需要学习的课程 for(let i of document.querySelectorAll(".item[data-resource-id]")){ let status = i.querySelector(".operation").innerText let name = i.querySelector(".name-des").innerText if(/(继续学习)|(开始学习)/.test(status)){ GM_setValue("doing",{"name":name,"time":new Date().getTime(),"status":status}) i.click() return true } } return false } if(/study\/subject\/detail/.test(window.location.href)){ // 课程主页,在当前页面实现控制做哪些课程 setInterval(function(){ let doing_item = GM_getValue("doing") let next_flag = false if(new Date().getTime()-doing_item.time>1000*20){ //超过20s没有更新状态视为过期 next_flag = true new ElegantAlertBox("准备开始新的课程>__<") }else{ next_flag = false new ElegantAlertBox("有课程正在学习中,请等待>__<") } if (next_flag){ if(click_course() ){ //有需要做的课程,已经点击 new ElegantAlertBox("已打开新的学习页面学习>__<") }else{ new ElegantAlertBox("找不到需要学习的内容>__<") } } },5000) }else if(/study\/course\/detail/.test(window.location.href)){ //视频播放页,做完后给主页一个标志,结束标签页 setInterval(function(){ let name = document.querySelector("div.title-row > div") if(name){ name = name.innerText }else{return} GM_setValue("doing",{"name":name,"time":new Date().getTime(),"status":"学习中"}) let state = document.querySelector("dl.focus > div.chapter-right > div.section-item.section-item11 > div:nth-child(3) > span") state = state?state.innerText:null if(state == "已完成"){ new ElegantAlertBox("准备播放下一个视频>__<") let courses = document.querySelectorAll("dl") for(let i of courses){ if(i.querySelector("div.chapter-right > div.section-item.section-item11 > div:nth-child(3) > span").innerText != "已完成"){ i.click() return } } new ElegantAlertBox("全部学习完>__<") GM_setValue("doing",{"name":name,"time":new Date().getTime()-1000*30,"status":"已完成"}) GM_setValue(name,{"name":name,"time":new Date().getTime()-1000*30,"status":"已完成"}) window.close() }else{ new ElegantAlertBox("还没有学习完 >__<") if(document.querySelector(".register-mask-layer") && 'display: none;' != document.querySelector(".register-mask-layer").getAttribute("style")){ document.querySelector("#D210registerMask").click() } document.querySelector("video").muted="muted" document.querySelector("button.vjs-big-play-button").click() //开始播放的按钮 } },5000) } // Your code here... })();