Greasy Fork is available in English.

辽宁省干部在线学习网-专业技术专区专用

专业技术只能自然时长挂课时,其他专区均可刷课时

// ==UserScript==
// @name         辽宁省干部在线学习网-专业技术专区专用
// @namespace    代刷课程
// @version      1.06
// @description  专业技术只能自然时长挂课时,其他专区均可刷课时
// @author       代刷vx:GKmkj123
// @match        *://zyjs.lngbzx.gov.cn/*
// @match        *://zyjsvideo.lngbzx.gov.cn/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=lngbzx.gov.cn
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    document.addEventListener("visibilitychange", function() {
        console.log(document.visibilityState);
        if(document.visibilityState == "hidden") {
        } else if (document.visibilityState == "visible") {
            if(document.URL.search('yearplan/gostudy')>1){setTimeout(sx,1000)}
        }
    });
    function sx(){window.location.reload()}

    function zy(){
        if(document.URL.search('yearplan/gostudy')>1){
            var xxnum= document.querySelectorAll('dl.w_zxinfo.fl>dd.time>span.fr')
            for (var i=0;i<xxnum.length;i++){
                if(xxnum[i].innerText !=='完成100.0%' &&  xxnum[i].innerText !=='完成100%'){
                    document.querySelectorAll('dl.w_zxinfo.fl>dd.teach>p')[i].click()
                    break;
                }else if(i==xxnum.length-1){
                    var yeshu=document.querySelectorAll('ul.pagination>li').length-2
                    var nowyeshu=Number( document.querySelector('ul.pagination>li>span.on').innerText)
                    if(yeshu==nowyeshu){
                        window.close()
                    }else {
                        document.querySelector('ul.pagination>li>span.on').parentNode.nextElementSibling.getElementsByTagName('a')[0].click()
                    }
                }
            }
        }
    }
    setTimeout(zy,3000)

    function cy(){
        if(document.URL.search('resource/info')>1){
            if(document.getElementsByTagName('button')[0].innerText=="点击观看"){
                document.getElementsByTagName('button')[0].click()
            }
        }
    }
    setTimeout(cy,2000)

    function bfy(){
        if(document.URL.search('study/xml/video')>1){
            window.close() }
    }
    setTimeout(bfy,600000)

    function bfyy(){
        if(document.URL.search('study/xml/tss')>1){
            location.replace(document.querySelectorAll('iframe')[1].src)}
    }
    setTimeout(bfyy,3000)
    function bfyyy(){
        if (document.URL.search('zyjsvideo')>1){
            document.querySelector('.user_choise').click()
        }
    }
    setTimeout(bfyyy,3000)
})();