Crack Forclass 2

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

目前為 2021-04-19 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(function () {
  "use strict";

  /*jslint browser: true */
  /*global window */

  let unsafeWindow = unsafeWindow || window

  const ChangeState = (result, target) => {
    if (result.length > 4) {
      let $fragment = $(document.createDocumentFragment());
      for (let i = 4; i < result.length; i++) {
        let res = result[i];
        let createTr = $('<tr>');
        let createTd = $('<td>');
        createTd.html(res.Subject || '--');
        createTd.appendTo(createTr);
        createTd = $('<td>');
        createTd.html(res.TeacherName || res.LoginName || '--');
        createTd.appendTo(createTr);
        createTd = $('<td>');
        createTd.html('--');
        createTd.appendTo(createTr);
        createTd = $('<td>');
        let createA_t = $('<a class="wk-tit"> ' + (res.AName || '--') + ' </a>');
        createTd.append(createA_t);
        createTd.append($('<br />'));
        let createTime = $('<time>');
        createTime.html('开始时间:' + res.StartTime || '--');
        createTd.append(createTime);
        createTd.appendTo(createTr);
        createTd = $('<td>');
        createTd.html(res.EndTime || '--');
        createTd.appendTo(createTr);
        createTd = $('<td>');
        createTd.html('--');
        createTd.appendTo(createTr);
        createTd = $('<td>');
        let $link = $('<a href="javascript:;"></a>');

        let baseParam = {
          aidx: res.AIdx,
          type: res.PTIdx,
          isdtk: res.is_paper_dtk
        };
        if (res.State === "未开始") {
          baseParam.atype = res.TypeName;
          baseParam.limit = res.answer_paper_total;
          baseParam.checktype = res.CheckTypeIdx;
          let href = `/Student/Dati?${$.param(baseParam)}`;
          $link.attr({
            "class": "icon-write icon-paper-link",
            href,
            "title": "Cracked",
            "showname": "Cracked"
          });
        }
        $link.appendTo(createTd);
        createA_t.attr("href", $link.attr("href"));
        createTd.appendTo(createTr);
        $fragment.append(createTr);
      }
      $fragment.prependTo(target);
    }
  };

  let param = {
    session: unsafeWindow.getSession(),
    page: 1,
    count: 7,
    index: 1,
    stateName: "全部", // 全部|课前导学|导学测评
    subject: "全部", // 全部|语文|数学...
    sName: "待完成", // 批阅状态
    fromDate: "", // 开始时间
    toDate: "" // 截止时间
  };
  unsafeWindow.AbortControlleraddToQueue("GetSCStudentAssignmentList", param, (result, target) => {
    ChangeState(result, target);
  }, $("#el-tbWorkLst tbody"), true);
})();