Greasy Fork is available in English.
全自动刷课|代刷VX:shuake345
// ==UserScript==
// @name 湖南省中小学教师发展网-湖南省高校师资培训云平台-湖南人才市场网-VX-shuake345
// @namespace 全自动
// @version 0.12.2
// @description 全自动刷课|代刷VX:shuake345
// @author 代刷VX:shuake345
// @match *://ifang.hnteacher.net/HTML/WorkShops/*
// @match https://sts.hnteacher.net/Home/index
// @match http://*.hunan.smartedu.cn/*
// @icon http://ifang.hnteacher.net/HTML/WorkShops/image/head-logo.png
// @grant none
// ==/UserScript==
(function() {
'use strict';
var Kctime='7小时'
var n=0
window.alert = function() {}
window.onbeforeunload = null
window.confirm = function() {
return true
}
document.addEventListener("visibilitychange", function() {
console.log(document.visibilityState);
if(document.visibilityState == "hidden") {
console.log('隐藏');
} else if (document.visibilityState == "visible") {
console.log('显示')
if(document.URL.search('PK_ID')>1){
setTimeout(sx,1000)}
}
});
function zuofei1(){
if(document.URL.search('HTML/WorkShops/index')>1){document.querySelector("#pageMenu > a:nth-child(6)").click()}
if(document.URL.search('HTML/WorkShops/workshop')>1){
var Alltimes=document.querySelectorAll("#courseList > li > div > p.bottom > span.long")
var Allkecheng=document.querySelectorAll("#courseList > li > div > p.text.cl > a")
for (var i=0;i<Alltimes.length;i++){
if(Alltimes[i].innerText.search(Kctime)>1){
Allkecheng[i].click()
break
}
}
}
}
setTimeout(zuofei1,7252)
function sx(){
window.location.reload()
}
function bfy(){
if(document.URL.search('inLessonId=')>1){
if(document.getElementsByTagName('img')[4].title=='gorgeous'){document.getElementsByTagName('img')[4].click()}
if(parseInt(document.getElementById('min').innerText)==parseInt(document.getElementById('_ctime').innerText)){
localStorage.setItem('key',document.getElementById('_kjmc').innerText)
window.close()
}
}
}
setInterval(bfy,15000)
function zy(){
if(document.URL.search('PK_ID')>1 ){
if(document.getElementsByClassName('bg-blue').length>0){
if($('.bg-blue')[0].innerText=="未学习"){
$('.bg-blue')[1].click()
clearInterval(zydj)
}else{$('.bg-blue')[0].click()
clearInterval(zydj)}
}else{
var KCjd=document.querySelectorAll("b.fcolor-green")
for (var i=0;i<KCjd.length;i++){
if(KCjd[i].innerText.search('100')<1){
KCjd[i].parentElement.firstChild.click()
clearInterval(zydj)
break
}
}
}
}
}
var zydj=setInterval(zy,8000)
function zuizhuye(){
if(document.URL.search('Home/index')>1){
document.querySelector("body > div> table > tbody > tr.trcolor > td:nth-child(3) > a").click()
}
}
setTimeout(zuizhuye,2121)
})();