您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
网上学院函数库:自动报名
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/396002/769714/wsxy_autoSignup.js
// ==UserScript== // @name wsxy_autoSignup // @namespace Vionlentmonkey // @version 0.1 // @description 网上学院函数库:自动报名 // @require https://greasyfork.org/scripts/395748-wsxy-getdata/code/wsxy_getData.js // @grant none // ==/UserScript== const autoSign3Credit = async () => { // 彩蛋:需要 iframe 提升才会执行 if (!passPhrase && window.top === window.self) { let courses = document.querySelectorAll('#requiredCourseTable .course'); for await (let c of courses) { let coursePk = c.getElementsByClassName('coursePk')[0].textContent; let title = c.getElementsByClassName('title')[0].getAttribute('title'); let jdjs = c.getElementsByClassName('jdjs')[0].textContent; // 进度 let csInfo = await getCourseInfo(coursePk); let csCredit = csInfo.courseCredit; // 彩蛋:需要 iframe 提升才会执行 if (window.top === window.self) { if (jdjs === '未报名') { // 自动报名高学分课程 if (csCredit > 1) { console.log(`${csCredit}学分:${title}`); c.click(); console.log('click:' + title); const info = document.getElementsByClassName('layui-layer-btn0'); if (info.length === 1) { document.getElementsByClassName('layui-layer-btn0')[0].click(); console.log('报名:' + title); } } } } } } };