// ==UserScript== // @name 新疆生产建设兵团干部网络学院 // @namespace 需要代刷++++++v:shuake345 ++++++++ // @version 0.1 // @description 主页点击:课程按钮|自动学习小节|未写自动换课功能|需要代刷+vx:shuake345 // @author vx:shuake345 // @match https://xjbt.gwypx.com.cn/* // @grant none // @icon https://network-college.oss.cn-north-3.inspurcloudoss.com/resource/website/xj/pc-title-logo.png // @license MIT // ==/UserScript== (function() { 'use strict'; window.alert = function() { } window.onbeforeunload = null window.confirm = function() { return true } var Zhuyurl = 'projectDetail' var Chuyurl = 'commend' document.addEventListener("visibilitychange", function() { console.log(document.visibilityState); if (document.visibilityState == "hidden") { //yincang } else if (document.visibilityState == "visible") { if (document.URL.search(Zhuyurl) > 1) { setTimeout(sxrefere, 1000) } } }); function fhback() { window.history.go(-1) } function gbclose() { window.close() } function sxrefere() { window.location.reload() } function Zhuy() { var KC = document.querySelectorAll("div > div > div > div > div.course-list-item-message > div > button") //[0].href var KCjd = document.querySelectorAll("div.course-list-item-message > div > div > div > div.el-progress__text") //[0].innerText for (var i = 0; i < KCjd.length; i++) { if (KCjd[i].innerText !== '100%') { KC[i].click() break; } } } function Chuy() { if (document.getElementsByTagName('video').length == 1) { document.getElementsByTagName('video')[0].volume = 0 document.getElementsByTagName('video')[0].play() } if (document.querySelector("div.titleContent > div > div.el-progress__text").innerText=='100%') { setTimeout(gbclose,124) } setTimeout(sxrefere, 300000) } function QT(){ var d1=document.getElementsByClassName('path')[0]; var img=document.createElement("img"); img.style="width:230px; height:230px;" img.src="https://img.nuannian.com/files/images/23/0305/1677989951-1403.jpg";//qitao img.src="https://img.nuannian.com/files/images/23/1019/1697723881-6511.png";//xuanchuan d1.appendChild(img); } function Pd() { if (document.URL.search(Chuyurl) > 2) { setInterval(Chuy, 6000) setTimeout(QT, 1224) } else if (document.URL.search(Zhuyurl) > 2) { setTimeout(Zhuy, 4224) } } setTimeout(Pd, 2254) })();