Greasy Fork

来自缓存

Greasy Fork is available in English.

💯🥇🥇柠檬文才-批量课程助手💯🥇🥇

柠檬文才-批量课程助手

在您安装前,Greasy Fork 希望您知道此脚本声明其包含了一些负面功能。这些功能也许会使脚本作者获利,而不能给您带来任何直接的金钱收益。

您只有在付费后才能使用脚本的全部功能。Greasy Fork 未参与到支付的流程,因此无法验证您是否获得了有价值的东西,亦无法帮助您申请退款。

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         💯🥇🥇柠檬文才-批量课程助手💯🥇🥇
// @namespace    http://www.xxx.com
// @version      1.0
// @description  柠檬文才-批量课程助手
// @author       Your Name
// @match        *.wencaischool.net/*
// @grant        GM_addStyle
// @grant      				GM_info
// @grant      				GM_getTab
// @grant      				GM_saveTab
// @grant      				GM_setValue
// @grant      				GM_getValue
// @grant      				unsafeWindow
// @grant      				GM_listValues
// @grant      				GM_deleteValue
// @grant      				GM_notification
// @grant      				GM_xmlhttpRequest
// @grant      				GM_getResourceText
// @grant      				GM_addValueChangeListener
// @grant      				GM_removeValueChangeListener
// @run-at     				document-start
// @namespace  				https://enncy.cn
// @homepage   				https://docs.ocsjs.com
// @source     				https://github.com/ocsjs/ocsjs
// @icon       				https://cdn.ocsjs.com/logo.png
// @connect    				enncy.cn
// @connect    				icodef.com
// @connect    				ocsjs.com
// @connect    				localhost
// @antifeature				payment
// ==/UserScript==

// Create the float box element
const floatBox = document.createElement('div');
floatBox.id = 'float-box';
floatBox.innerHTML = `
    <div style="background-color: rgba(255, 255, 0, 0.8); padding: 10px;">
        <p style="font-weight: bold; font-size: 18px;">float box for 柠檬文才</p>
        <br>
        <p><input type="checkbox">第一学期</p>
        <p><input type="checkbox">第二学期</p>
        <p><input type="checkbox">第三学期</p>
        <p><input type="checkbox">第四学期</p>
        <p><input type="checkbox">第五学期</p>
        <p><input type="checkbox">第六学期</p>
        <br>
        <p><input type="checkbox">课件</p>
        <p><input type="checkbox">作业</p>
        <br>
        <button id="start-btn">启动挂机</button>
        <br>
        <p>当前题库共:796189道</p>
        <br>
        <p><a href="https://flowus.cn/share/320cb53a-9376-4c35-987e-436e46f9b235" style="color: blue;">查看批量教程</a></p>
    </div>
`;

// Add the float box to the page
document.body.appendChild(floatBox);

// Add styles to the float box
GM_addStyle(`
    #float-box {
        position: fixed;
        top: 50px;
        left: 50px;
        z-index: 9999;
        cursor: move;
    }
`);

// Make the float box draggable
let isDragging = false;
let dragOffsetX = 0;
let dragOffsetY = 0;

floatBox.addEventListener('mousedown', (e) => {
    isDragging = true;
    dragOffsetX = e.pageX - floatBox.offsetLeft;
    dragOffsetY = e.pageY - floatBox.offsetTop;
});

floatBox.addEventListener('mouseup', () => {
    isDragging = false;
});

floatBox.addEventListener('mousemove', (e) => {
    if (isDragging) {
        floatBox.style.left = `${e.pageX - dragOffsetX}px`;
        floatBox.style.top = `${e.pageY - dragOffsetY}px`;
    }
});

// Add event listener to the start button
const startBtn = document.getElementById('start-btn');
startBtn.addEventListener('click', () => {
    alert('启动失败需要更新');
});
  WorkerJSPlus({
        name: "柠檬文才(考试)",
        match: () => {
            const pathMatch = location.pathname.includes("/separation/exam/");
            const matchHostArr = [ "learning.wuxuejiaoyu.cn", "learning.wencaischool.net", "learning.zk211.com" ];
            return pathMatch && matchHostArr.includes(location.host);
        },
        intv: () => {
            return $("#paperExam").css("display") != "none";
        },
        root: ".paperWrapper .tmList",
        elements: {
            question: ".tmTitleTxt",
            options: ".ansbox .opCont",
            $options: ".ansbox input"
        },
        ignore_click: $item => {
            return $item.prop("checked");
        },
        wrap: obj => {
            if (obj.options.length === 0) {
                obj.type = 2;
            }
            console.log(obj);
        },
        fill: (type, answer, $option) => {
            if (type === 4 || type === 2) {
                $option.val(answer);
            }
        }
    });
    WorkerJSPlus({
        name: "柠檬文才(作业)",
        match: () => {
            const matchHostArr = [ "learning.wuxuejiaoyu.cn", "learning.wencaischool.net", "learning.zk211.com" ];
            return location.pathname.includes("/xbsflearning/exam/") && matchHostArr.includes(location.host);
        },
        intv: () => {
            return $("#paperExam").css("display") !== "none";
        },
        root: "#_block_content_exam #tblDataList>tbody>tr",
        elements: {
            question: "tbody:first>tr>td:last table",
            options: ".ansbox .opCont",
            $options: ".ansbox input"
        },
        ignore_click: $item => {
            return $item.prop("checked");
        },
        wrap: obj => {
            obj.question = $("#_block_content_exam #tblDataList>tbody>tr>td").find(" tbody:first>tr>td:last table:first").eq(GLOBAL.index - 1).find("tr:first").text();
            obj.options = [];
            $("#_block_content_exam #tblDataList>tbody>tr>td").find(" tbody:first>tr>td:last table:first").eq(GLOBAL.index - 1).find("tr:first").next().find("label").map((i, y) => {
                obj.options.push($(y).text());
            });
            obj.$options = [];
            $("#_block_content_exam #tblDataList>tbody>tr>td").find(" tbody:first>tr>td:last table:first").eq(GLOBAL.index - 1).find("tr:first").next().find("input").map((i, y) => {
                obj.$options.push(y);
            });
            obj.type = 0;
            console.log(obj);
        }
    });