Crack Forclass

这同样适用于 Forclass,Sunclass,271BAY,Zhizhiniao

目前為 2020-07-31 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name               Crack Forclass
// @namespace          https://crack-forclass.houtarchat.ml/
// @version            3.1.0
// @description        这同样适用于 Forclass,Sunclass,271BAY,Zhizhiniao
// @author             Houtarchat
// @match              *://*.forclass.net/Student/Dati*
// @match              *://*.271bay.com/Student/Dati*
// @contributionURL    https://www.houtarchat.ml/donate.html
// @contributionAmount 5 RMB
// @grant              none
// @license            GNU General Public License
// ==/UserScript==

(function () {
    "use strict";

    function getQueryVariable(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i = 0; i < vars.length; i++) {
            var pair = vars[i].split("=");
            if (pair[0] == variable) {
                return pair[1];
            }
        }
        return false;
    }
    g_debugmode = true;
    if (getQueryVariable("type") == "5") {
        window.alert("无需破解!");
        return;
    }
    window.alert("Houtarchat 破解!\n错误修正:\n1.修正了无法上传图片的问题\n2.修正了无法启用剪切、复制、粘贴的问题\n3.修正了脚本有时无效的问题");
    tick = function tick() { };
    var dajxurl = location.protocol + "//" + location.host + "/Student/Dajx?aidx=" + aidx;
    var sd = window.prompt("答案已经被检测到,是否为您打开?\n输入0取消,输入1打开弹出式页面,\n(实验性)输入2打开frame页面");
    if (sd !== null && sd != "0") {
        if (sd == "1") {
            window.open(dajxurl);
        } else if (sd == "2") {
            var out = document.createElement("div");
            out.setAttribute("class", "dlg-out");
            out.setAttribute("style", "z-index:3000;left:362.5px;top:140.5px;display:block");
            document.querySelector("#main").appendChild(out);

            var bar = document.createElement("div");
            bar.setAttribute("class", "dlg-bar");
            out.appendChild(bar);

            var title = document.createElement("div");
            title.setAttribute("class", "dlg-title");
            title.innerText = "Houtarchat";
            bar.appendChild(title);

            var rtbtns = document.createElement("div");
            rtbtns.setAttribute("class", "dlg-rtbtns-out");
            bar.appendChild(rtbtns);

            var closeE = document.createElement("div");
            closeE.setAttribute("class", "dlg-close-e");
            closeE.setAttribute("style", "text-align:center;width:34px;height:39px;display:inline-block;cursor:pointer;vertical-align:top;cursor:pointer;font-size:21px;font-weight:700");
            closeE.innerText = "×";
            rtbtns.appendChild(closeE);

            var body = document.createElement("iframe");
            body.setAttribute("class", "dlg-body");
            body.setAttribute("src", dajxurl);
            body.setAttribute("style", "height:250px;width:450px;left:0;overflow:scroll;");
            body.setAttribute("scrolling", "yes");
            out.appendChild(body);

            var about = document.createElement("div");
            about.setAttribute("style", "border:1px solid #ccc;background:#eee;position:absolute;display:none;padding-left: 20px;padding-right: 20px;padding-top: 10px;padding-bottom: 10px;");
            about.innerHTML = "关于 <a href=\"https://www.forclass.tk/script\">Crack Forclass<\/a>:<br>作者:Houtarchat<br>感谢名单(不分先后顺序):<ul><li>桐人<\/li><li>亚丝娜<\/li><li>爱萌二的零二<\/li><\/ul>\n";
            out.appendChild(about);

            bar.oncontextmenu = function (e) {
                e = e || window.event;
                e.preventDefault();
                about.style.display = 'block';
                about.style.left = e.clientX - 362.5 + 'px';
                about.style.top = e.clientY - 140.5 + 'px'
            }
            bar.onclick = function () {
                if (event.target !== closeE) {
                    var e = event;
                    about.style.display = 'block';
                    about.style.left = e.clientX - 362.5 + 'px';
                    about.style.top = e.clientY - 140.5 + 'px'
                }
                else {
                    if (about.style.display == "block") {
                        about.style.display = "none"
                    }
                    else {
                        out.style.display = "none"
                    }
                }
            }

            if (body.attachEvent) {
                body.attachEvent("onload", function () {
                    var content = document.querySelector("#main > div:nth-child(10) > iframe").contentDocument;
                    var style = content.createElement("style");
                    style.innerText = "*{max-width:520px!important;}";

                    content.querySelector("head").appendChild(style);
                    content.querySelector("body").setAttribute("style", "width: 1040px;");
                    content.querySelector("#main > div.el-main.el-w1200").setAttribute("style", "width:520px");
                    content.querySelector("#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content").setAttribute("style", "width:520px");
                    content.querySelector("#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content > div").setAttribute("style", "width:520px");
                    content.querySelector("#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content > div.el-main-right.el-stu-manual-r > div > div").setAttribute("style", "width:520px");

                    content.querySelector("#header").remove();
                    content.querySelector("#footer").remove();
                    content.querySelector("#main > div.el-main.el-w1200 > div > div.totop").remove();
                    content.querySelector("#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content > div.el-main-left.el-main-left-thin").remove();
                });
            } else {
                body.onload = function () {
                    var content = document.querySelector("#main > div:nth-child(10) > iframe").contentDocument;
                    var style = content.createElement("style");
                    style.innerText = "*{max-width:520px!important;}";

                    content.querySelector("head").appendChild(style);
                    content.querySelector("body").setAttribute("style", "width: 1040px;");
                    content.querySelector("#main > div.el-main.el-w1200").setAttribute("style", "width:520px");
                    content.querySelector("#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content").setAttribute("style", "width:520px");
                    content.querySelector("#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content > div").setAttribute("style", "width:520px");
                    content.querySelector("#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content > div.el-main-right.el-stu-manual-r > div > div").setAttribute("style", "width:520px");

                    content.querySelector("#header").remove();
                    content.querySelector("#footer").remove();
                    content.querySelector("#main > div.el-main.el-w1200 > div > div.totop").remove();
                    content.querySelector("#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content > div.el-main-left.el-main-left-thin").remove();
                }
            }
        }
    }
    window.onload = function () {
        $(".qoption input,.qoption textarea").unbind("cut copy paste");
    };
    document.querySelector("#paperoperation > div.el-dati-funcs.el-upload-submit > div.el-dati-submit-td").setAttribute("class", "el-dati-submit-td");
    document.querySelector("#paperoperation > div.el-dati-funcs.el-upload-submit > div.el-dati-btn-submit").onclick = function () {
        if (window.confirm("如果您无法提交,请点击确定以强制提交")) {
            uploadQuestionAnswer(paidx, aidx, true, window.alert("已提交!"));
        }
    };
})();