Greasy Fork

Greasy Fork is available in English.

清除雨课堂做题痕迹

清除雨课堂试卷做题痕迹(仅UI变更,不涉及雨课堂后台数据),便于复习。支持黑暗模式、日光模式(需更新到V3.0.0.RELEASE及以上版本)。支持吃菇子的“手气不错”模式(需更新到V3.1.0.RELEASE及以上版本)

当前为 2022-06-08 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         清除雨课堂做题痕迹
// @namespace    http://tampermonkey.net/
// @version      3.1.0.RELEASE
// @description  清除雨课堂试卷做题痕迹(仅UI变更,不涉及雨课堂后台数据),便于复习。支持黑暗模式、日光模式(需更新到V3.0.0.RELEASE及以上版本)。支持吃菇子的“手气不错”模式(需更新到V3.1.0.RELEASE及以上版本)
// @author       冰镇杨梅瑞纳冰YYDS
// @match        https://examination.xuetangx.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=xuetangx.com
// @grant        none
// @license DONT FUCKING CARE
// ==/UserScript==

(function() {
    'use strict';
     var checkDiv = document.createElement("div");
    var rightAnswer;
    var button;
    var isClicked = 0;
    checkDiv.setAttribute("id","test");
    document.body.appendChild(checkDiv);
    var testBlock = document.getElementById("test");
    testBlock.style.height="auto";
    testBlock.style.width="auto";
    testBlock.style.position="fixed";
    testBlock.style.top=0;
    testBlock.style.right=0;
    testBlock.style.zindex=1000;
    testBlock.innerHTML+='<div style="margin:60px; z-index:1000; text-align:center;" ><button id="start" onClick="ErasAll()" width="40px" style=\"background-color:#4286F3; padding:15px; border-radius:5px;border:0;color:white\">清除做题痕迹</button><br><button id="nightmode" onClick="Night()" style=\"background-color:#002361; padding:15px; border-radius:5px;border:0;color:white;margin-top:10px;\">🌙</button><button id="daymode" onClick="Day()" style=\"background-color:#fcd5c0; padding:15px; border-radius:5px;border:0;color:white;margin-top:10px;margin-left:10px;\">🌞</button><br><button id="start" onClick="ImFeelingLucky()" width="40px" style=\"background-color:#4286F3; padding:15px; border-radius:5px;border:0;color:white;margin-top:10px;\">🦚 手气不错</button></div>'
    // Your code here...



    window.Night = function(){

        var mainbackground = document.getElementsByClassName("exam-main");
mainbackground[0].style.backgroundColor="black";
        mainbackground[0].style.backgroundColor="black";
        mainbackground[0].style.transitionDuration="1s";
        mainbackground = document.getElementsByClassName("header-content");
mainbackground[0].style.backgroundColor="black";
        mainbackground[0].style.transitionDuration="1s";
        mainbackground = document.getElementsByClassName("exam-aside");
mainbackground[0].style.backgroundColor="black";
        mainbackground[0].style.transitionDuration="1s";
        mainbackground = document.getElementsByClassName("exam-main--body");
mainbackground[0].style.backgroundColor="#0c0d0d";
        mainbackground[0].style.color="#d4d4d4";
        mainbackground[0].style.transitionDuration="1s";
        mainbackground = document.getElementsByClassName("item-footer");

        for(let i=0;i<mainbackground.length;i++){
            mainbackground[i].style.backgroundColor="black";
    mainbackground[i].style.color="#d4d4d4";
        mainbackground[i].style.transitionDuration="1s";

}

        mainbackground = document.getElementsByTagName("p");
for(let i=0;i<mainbackground.length;i++){
    mainbackground[i].style.color="#d4d4d4";
    mainbackground[0].style.transitionDuration="1s";

}
        var bala = document.getElementsByClassName("radioInput");
        for(let i=0;i<bala.length;i++){
            bala[i].style.backgroundColor="black";
            bala[i].style.color="#d4d4d4";
    }
    }

    window.Day = function(){
        var mainbackground = document.getElementsByClassName("exam-main");
mainbackground[0].style.backgroundColor="#f7f7f7";
        mainbackground = document.getElementsByClassName("header-content");
mainbackground[0].style.backgroundColor="white";
        mainbackground = document.getElementsByClassName("exam-aside");
mainbackground[0].style.backgroundColor="white";
        mainbackground = document.getElementsByClassName("exam-main--body");
mainbackground[0].style.backgroundColor="white";
        mainbackground[0].style.color="black";
        mainbackground = document.getElementsByTagName("p");
for(let i=0;i<mainbackground.length;i++){
    mainbackground[i].style.color="black";

}
         mainbackground = document.getElementsByClassName("item-footer");

        for(let i=0;i<mainbackground.length;i++){
            mainbackground[i].style.backgroundColor="#f9f9f9";
    mainbackground[i].style.color="black";
        mainbackground[i].style.transitionDuration="1s";

}
        var bala = document.getElementsByClassName("radioInput");
        for(let i=0;i<bala.length;i++){
            bala[i].style.backgroundColor="white";
            bala[i].style.color="#d4d4d4";
    }


    }

     window.RandomColor=function(){
        var r = Math.floor(Math.random() * 256);
        var g = Math.floor(Math.random() * 256);
        var b = Math.floor(Math.random() * 256);
        return "rgb(" + r + "," + g + "," + b + ")";
    };

    window.ImFeelingLucky=function(){
         var mainbackground = document.getElementsByClassName("exam-main");
mainbackground[0].style.backgroundColor=RandomColor();
        mainbackground[0].style.backgroundColor=RandomColor();
        mainbackground[0].style.transitionDuration="1s";
        mainbackground = document.getElementsByClassName("header-content");
mainbackground[0].style.backgroundColor=RandomColor();
        mainbackground[0].style.transitionDuration="1s";
        mainbackground = document.getElementsByClassName("exam-aside");
mainbackground[0].style.backgroundColor=RandomColor();
        mainbackground[0].style.transitionDuration="1s";
        mainbackground = document.getElementsByClassName("exam-main--body");
mainbackground[0].style.backgroundColor=RandomColor();
        mainbackground[0].style.color=RandomColor();
        mainbackground[0].style.transitionDuration="1s";
        mainbackground = document.getElementsByClassName("item-footer");
        let theColor = RandomColor();
        let theColor2 = RandomColor();
        for(let i=0;i<mainbackground.length;i++){
            mainbackground[i].style.backgroundColor=theColor;
    mainbackground[i].style.color=theColor2;
        mainbackground[i].style.transitionDuration="1s";

}

        mainbackground = document.getElementsByTagName("p");
for(let i=0;i<mainbackground.length;i++){
    mainbackground[i].style.color="#d4d4d4";
    mainbackground[0].style.transitionDuration="1s";

}
        var bala = document.getElementsByClassName("radioInput");
        for(let i=0;i<bala.length;i++){
            bala[i].style.backgroundColor="black";
            bala[i].style.color="#d4d4d4";
    }
    }



    window.ErasAll = function(){
        isClicked=1;
        alert("🐵你的答案痕迹已被清除,查看答案点击对应题目的查看答案。题目处理可能需要等待。");
        // 删除所有蓝色选项按钮
       var sideBar = document.getElementsByClassName('exam-aside');
        sideBar[0].style.transitionDuration="1s";
      sideBar[0].style.display="none";
var headerbar = document.getElementsByClassName("header");
headerbar[0].style.display="none";
        var isChecked = document.getElementsByClassName('el-radio');
        for(let i=0;i<isChecked.length;i++){
            isChecked[i].className="el-radio is-disabled";
            isChecked[i].style.transitionDuration="1s";
        }

        
        //隐藏所有正确答案
        rightAnswer = document.getElementsByClassName("item-footer");
        for(let g=0;g<rightAnswer.length;g++){
            rightAnswer[g].style.display="none";
        }
        //新增显示答案
        var questions = document.getElementsByClassName("item-body");
      
        for(let t=0;t<questions.length;t++){
            var num = t;
            questions[t].innerHTML+='<button id="'+t+'" class="ShowAnswerBtn" style="background-color: #4286F3; padding:15px; border-radius:5px;border:0;color:white" onClick="ShowAnswer('+t+')"><p>显示答案</p></button><a id="num" style="display:none;">'+num+'</a>';

        
}

        var myTextAnswer = document.getElementsByClassName("subject-answer");
        for(let i=0;i<myTextAnswer.length;i++){
            myTextAnswer[i].innerHTML="你的答案已被脚本吃掉了";
        }
        for(let j=0;j<50;j++){
            //删除所有的标记(多删几次)
            var rightAnswerMark = document.getElementsByClassName("dot");
            for(let i=0;i<rightAnswerMark.length;i++){
                let dotParent = rightAnswerMark[i].parentNode;
                dotParent.removeChild(rightAnswerMark[i]);
            }
        }
    }
    window.ShowAnswer=function(num){
       rightAnswer[num].style.display="block";
var thebutton = document.getElementsByClassName('ShowAnswerBtn');
thebutton[num].style.display="none";
   }

})();