新版陕西省专业技术人员继续教育刷课脚本分享
陕西省专业技术人员继续教育
# 脚本介绍
该油猴脚本用于 陕西省专业技术人员继续教育 的辅助看课,使用JavaScript编写,适配网址:https://*.xidian.edu.cn/
脚本功能如下:
1.视频自动播放(若无法自动播放,请参考文章:浏览器限制视频无法自动播放)
2.自动切换任务点
脚本安装地址:
https://scriptcat.org/zh-CN/script-show-page/4284 (opens new window)
如果不会安装脚本,请按照下面安装教程来操作。
# 代学服务
提示
如需代学,请联系客服,支持闲鱼交易。

微信联系:yizhituziang

QQ联系:2422270452
- img: /img/weixin.jpg
name: 微信联系:yizhituziang
- img: /img/qq.jpg
name: QQ联系:2422270452
# 安装教程
# 1.安装浏览器扩展插件
首先需要给我们的浏览器安装上脚本猫插件,这是运行所有用户脚本的基础,如果浏览器已经安装过了脚本猫或者油猴插件,那么可以跳过这一步。推荐使用edge浏览器,安装插件更方便。
浏览器打开网址:https://docs.scriptcat.org/ (opens new window)
这里用edge浏览器作为示范,点击 “添加到Edge浏览器”
接着点击 “获取”
在右上角弹出的窗口,点击 “添加扩展”
等待几秒钟,会提示已经安装好脚本猫插件了。
# 2.安装刷课脚本
打开脚本安装地址后,在页面点击 “安装脚本” 按钮,接着在弹出的窗口点击 “安装” ,之后就会提示“安装成功”。
# 3.体验脚本功能
安装脚本后,需要重新进入学习站点,如果之前已经打开课程学习页面,那么需要刷新页面后脚本才会生效。
# 核心代码
const processWork = async (iframe, iframeDocument, iframeWindow) => {
addLog({
value: `处理作业任务点`,
type: "info"
});
addLog({
value: `发现一个作业,正在解析`,
type: "warning"
});
return new Promise(async (resolve2) => {
var _a2;
if (!iframeDocument) return resolve2();
if (iframeDocument.documentElement.innerText.includes("已完成") || iframeDocument.documentElement.innerText.includes("待批阅")) {
addLog({
value: `作业已经完成,跳过`,
type: "success"
});
return resolve2();
}
crackFont(iframeDocument);
addLog({
value: `题目列表获取成功`,
type: "success"
});
await sleep(2);
const correctRate = await ((_a2 = new CxQuestionHandler("zj", iframe)) == null ? void 0 : _a2.init());
if (configStore.platformParams.cx.autoNext) {
addLog({
value: `自动提交已开启,尝试提交`,
type: "warning"
});
if (correctRate < configStore.otherParams.rate) {
addLog({
value: `正确率小于${configStore.otherParams.rate}%,暂存`,
type: "error"
});
await iframeWindow.noSubmit();
} else {
addLog({
value: `正确率大于${configStore.otherParams.rate}%,提交`,
type: "success"
});
await iframeWindow.btnBlueSubmit();
await sleep(configStore.otherParams.timeInterval / 2);
await iframeWindow.submitCheckTimes();
addLog({
value: `提交成功`,
type: "success"
});
}
} else {
addLog({
value: `未开启自动提交,暂存`,
type: "warning"
});
await iframeWindow.noSubmit();
}
addLog({
value: `作业已完成`,
type: "success"
});
return resolve2();
});
};