Crack Forclass

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

作者
Houtar Lyu
日安装量
0
总安装量
97
评分
1 0 0
版本
3.7.4
创建于
2020-06-20
更新于
2021-12-23
大小
8.9 KB
许可证
GNU General Public License
适用于

Here are the source code:

// ==UserScript==
// @name               Crack Forclass
// @namespace          https://www.forclass.tk/script
// @version            3.7.4
// @icon               https://houtar.coding.net/p/crackForclass/d/crackForclass/git/raw/master/icon.png
// @description        这同样适用于 Forclass,Sunclass,271BAY,Zhizhiniao
// @author             Houtarchat
// @match              *://*.forclass.net/Student/Dati*
// @match              *://*.271bay.com/Student/Dati*
// @match              *://web.zhizhiniao.com/Student/Dati*
// @contributionURL    https://www.houtarchat.ml/donate.html
// @contributionAmount 5 RMB
// @license            GNU General Public License
// @run-at             document-idle
// ==/UserScript==
(() => {
    /* jslint browser: true */
    /* global unsafeWindow */

    Pace.on("done", () => {
        unsafeWindow.g_debugmode = true;
        unsafeWindow.tick = () => null;
        unsafeWindow.polling4Submit = () => null;
        unsafeWindow.$('.qoption input,.qoption textarea').unbind('cut copy paste');
        $('#paperoperation > div.el-dati-funcs.el-upload-submit > div.el-dati-submit-td').addClass('el-dati-submit-td');
    });

    if (unsafeWindow.getRequestParamValue('type') === '5') {
        const oneClickCompletionReviewButton = document.createElement('input');
        oneClickCompletionReviewButton.onclick = () =>
            unsafeWindow.addToQueue('UploadAttachmentPaperAnswer2', {
                aidx: unsafeWindow.getRequestParamValue('aidx'),
                session: unsafeWindow.getSession(),
                page: 1,
                studentAnswerURL: '',
                size: '',
                studentAnswer: `<style type="text/css">#so360{white-space:nowrap}#so360 form{margin:0;padding:0}#so360_keyword{width:307px;height:24px;line-height:24px;font:14px arial;padding:2px 5px;margin-right:5px;border:2px solid #3eaf0e;outline:0;vertical-align:middle}#so360_submit{width:70px;height:32px;line-height:32px;border:0;color:#fff;background:#3fb30e;font-weight:700;font:bold 14px arial;padding:0;cursor:pointer;vertical-align:middle}.g-hd-logo{background-image:url(https://p.ssl.qhimg.com/t010e288a56a0b005e9.png);display:inline-block;height:22px;vertical-align:top;width:100px}.poweredby{margin-top:10px;margin-left:100px}</style><div id="so360"><form action="http://www.so.com/s" target="_blank" id="so360form"><input type="text" autocomplete="off" name="q" id="so360_keyword"> <input type="submit" id="so360_submit" value="搜 索"> <input type="hidden" name="ie" value="utf-8"></form><div class="poweredby">Powered by <a class="g-hd-logo" href="https://www.so.com/"></a> & <a href="https://space.bilibili.com/253498468" target="_blank">Houtarchat</a></div></div>`,
            }, () => {
                unsafeWindow.http('GetStudentAnsweredPaper', {
                    session: unsafeWindow.getSession(),
                    page: 1,
                    paidx: unsafeWindow.getRequestParamValue('paidx'),
                    aidx: unsafeWindow.getRequestParamValue('aidx'),
                }, response =>
                    unsafeWindow.addToQueue('SetAssignmentPaperAnswer', {
                        session: JSON.parse(unsafeWindow.sessionStorage.account).session,
                        paIdx: response[0]['PAIdx'],
                        score: '100',
                        comment: '',
                        page: 0,
                    }, () => null, '', true), '');
            }, '', true);
        oneClickCompletionReviewButton.type = 'button';
        oneClickCompletionReviewButton.value = '一键完成&批阅';
        $('.el-dati-attach-require').append(oneClickCompletionReviewButton);
    } else {
        const htTime = document.createElement('input');
        htTime.id = 'HT-Time';
        htTime.value = 'HH:mm:ss';
        const modificationTimeButton = document.createElement('input');
        modificationTimeButton.onclick = () =>
            [unsafeWindow.sessionStorage.hour, unsafeWindow.sessionStorage.minute, unsafeWindow.sessionStorage.second] = $('#HT-Time').val().split(':');
        modificationTimeButton.type = 'button';
        modificationTimeButton.value = '修改答题所用时间';
        const openAnswerPageByFrameButton = document.createElement('input');
        openAnswerPageByFrameButton.onclick = () => {
            const out = unsafeWindow.document.createElement('div'), bar = unsafeWindow.document.createElement('div'),
                title = unsafeWindow.document.createElement('div'), rtbtns = unsafeWindow.document.createElement('div'),
                closeE = unsafeWindow.document.createElement('div'),
                body = unsafeWindow.document.createElement('iframe');
            out.setAttribute('class', 'dlg-out');
            out.setAttribute(
                'style',
                'z-index:3000;left:362.5px;top:140.5px;display:block'
            );
            $('#main').append(out);
            bar.setAttribute('class', 'dlg-bar');
            out.appendChild(bar);
            title.setAttribute('class', 'dlg-title');
            title.innerText = 'Houtarchat';
            bar.appendChild(title);
            rtbtns.setAttribute('class', 'dlg-rtbtns-out');
            bar.appendChild(rtbtns);
            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 = '×';
            $(closeE).click(() => $(out).remove());
            rtbtns.appendChild(closeE);
            body.setAttribute('class', 'dlg-body');
            body.setAttribute('src', `${unsafeWindow.location.protocol}//${unsafeWindow.location.host}/Student/Dajx${location.search.replace('state', '')}${location.hash}`);
            body.setAttribute(
                'style',
                'height:250px;width:450px;left:0;overflow:scroll;'
            );
            body.setAttribute('scrolling', 'yes');
            out.appendChild(body);

            closeE.onclick = () => out.style.display = 'none';

            body.onload = () => {
                const contentDocument = unsafeWindow.document.querySelector(
                    '#main > div:nth-child(10) > iframe'
                ).contentDocument;
                const style = contentDocument.createElement('style');
                style.innerText = '*{max-width:520px!important;}';
                contentDocument.querySelector('head').appendChild(style);
                contentDocument.querySelector(`body`).setAttribute('style', 'width: 1040px;');
                contentDocument
                    .querySelector(`#main > div.el-main.el-w1200`)
                    .setAttribute('style', 'width:520px');
                contentDocument
                    .querySelector(
                        '#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content'
                    )
                    .setAttribute('style', 'width:520px');
                contentDocument
                    .querySelector(
                        '#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content > div'
                    )
                    .setAttribute('style', 'width:520px');
                contentDocument
                    .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');
                contentDocument.querySelector('#header').remove();
                contentDocument.querySelector('#footer').remove();
                contentDocument
                    .querySelector('#main > div.el-main.el-w1200 > div > div.totop')
                    .remove();
                contentDocument
                    .querySelector(
                        '#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content > div.el-main-left.el-main-left-thin'
                    )
                    .remove();
            };
        };
        openAnswerPageByFrameButton.type = 'button';
        openAnswerPageByFrameButton.value = '打开frame答案';
        const openAnswerPageByNewPageButton = document.createElement('input');
        openAnswerPageByNewPageButton.onclick = () =>
            window.open(`${unsafeWindow.location.protocol}//${unsafeWindow.location.host}/Student/Dajx${location.search.replace('state', '')}${location.hash}`);
        openAnswerPageByNewPageButton.type = 'button';
        openAnswerPageByNewPageButton.value = '新页面打开答案';
        $('.paperDesc').append(htTime, modificationTimeButton, '<br>', openAnswerPageByFrameButton, openAnswerPageByNewPageButton);
    }
})();