Greasy Fork

Greasy Fork is available in English.

广东理工学院学习工具

功能1:自动考试,功能2:挂机看视频,3.可以随时开始期末考试。使用本工具之前请先安装脚本管理器https://www.tampermonkey.net/

当前为 2022-04-18 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         广东理工学院学习工具
// @namespace    http://tampermonkey.net/
// @version      0.2.1
// @description  功能1:自动考试,功能2:挂机看视频,3.可以随时开始期末考试。使用本工具之前请先安装脚本管理器https://www.tampermonkey.net/
// @author       雾中仙
// @match        *.edu-edu.com/exam/student/exam/start/*
// @match        https://gdlgxy.edu-xl.com/MyOnlineCourseNew/OnlineLearningNew/OnlineLearningNewIndex
// @match        https://whcj.edu-edu.com/cws/home/couresware/play/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=aliyundrive.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    if (location.href.startsWith('https://whcj.edu-edu.com/cws/home/couresware/play/')) {
        clearInterval(1)
        clearInterval(2)
    } else if (location.href == 'https://gdlgxy.edu-xl.com/MyOnlineCourseNew/OnlineLearningNew/OnlineLearningNewIndex') {
        qmks_click = function (mid, time, timeend, finalExamSource, examMessage, isFaceQM, termcourseID, allowCount_CJ, vs_CJ, limitedTime_CJ, resume_CJ, vr_CJ) {
            //滚动条回到顶端
            window.top.document.documentElement.scrollTop = "100";
            window.top.document.body.scrollTop = "100" // 不能带px

            $.ajax({
                url: '/MyOnlineCourseNew/OnlineLearningNew/IsLimitIp',
                type: 'post',
                dataType: 'json',
                async: false,//把ajax改为同步。不会拦截,成功了
                data: { termCourse_id: termcourseID, IpAddr: $("#hidIpAddr").val() },
                success: function (data) {
                    if (!data.state) {
                        alert("当前IP[" + $("#hidIpAddr").val() + "]不在限制范围内,请联系管理员");
                        return;
                    } else {
                        $("#hidcourseCode").val(mid);
                        $("#hidcourse_id").val(termcourseID);
                        $("#hidButtonName").val("期末考试");
                        ShowCjAndDb(termcourseID, 3);
                    }
                }
            });
        }
    }else {
        window.onload = () => {
            let iframe = document.createElement("iframe")
            iframe.src = 'https://whcj.edu-edu.com/exam-admin/home/my/exam/review/'+__ExamIns.userExamId
            iframe.onload = () => {
                $.getJSON("/exam/student/exam/answer/"+__ExamIns.userExamId,(res) =>{
                    let paper = document.querySelector(".ui-paper-iframe").contentDocument
                    for (let i=0;i<res.answers.length;i++){
                        let answers = res.answers[i].answer.split("")
                        for(let j=0;j<answers.length;j++){
                            paper.querySelector("#q_" + res.answers[i].questionId +" [code='" + answers[j] +"'] span").click()
                        }
                    }
                    __ExamIns.SaveItem(null,null,null,null,function(){
                        $.post('/exam/student/exam/submit/'+__ExamIns.userExamId,{}, function(){
                            window.location=__ExamIns.basePath+'/finished/'+__ExamIns.userExamId
                        })
                    })
                })
            }
            document.body.append(iframe)
        }
    }
})();