// ==UserScript== // @name 国家中小学智慧教育平台_挂机 // @namespace http://tampermonkey.net/ // @version 0.4 // @description 挂机看 国家中小学智慧教育平台的视频 // @author kakasearch // @match https://www.zxx.edu.cn/teacherTraining/courseDetail* // @match https://basic.smartedu.cn/teacherTraining/courseDetail* // @icon https://www.google.com/s2/favicons?sz=64&domain=zxx.edu.cn // @require https://greasyfork.org/scripts/425166-elegant-alert-%E5%BA%93/code/elegant%20alert()%E5%BA%93.js?version=922763 // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; setInterval(function(){ if(document.querySelector("div.resource-item-active").querySelector("i").title == "已学完"){ new ElegantAlertBox("准备播放下一个视频>__<") for(let item of document.querySelectorAll(".resource-item")){ if (item.querySelector("i").title != "已学完"){ item.click() return } } setTimeout(function(){ new ElegantAlertBox("马上开始播放>__<"); document.querySelector(".vjs-big-play-button").click()},3000) }else{ document.querySelector("video").muted = true document.querySelector("video").play() document.querySelector(".vjs-big-play-button").click() new ElegantAlertBox("还在播放中") } },3000) setTimeout(function(){ //展开目录以获取全部章节 for(let item of document.querySelectorAll(".fish-collapse-header")){ item.click() } },60000) // Your code here... })();