广州市中小学教师继续教育网刷课脚本
广州市中小学教师继续教育网
# 脚本介绍
该油猴脚本用于 广州市中小学教师继续教育网 的辅助看课,使用JavaScript编写,适配网址:https://i.teacher.gzteacher.com/
脚本功能如下:
1.webtrn.cn机构课程,自动点击确定
2.tt.cn机构课程,视频中间题目自动答题
3.yanxiu.com机构课程,视频中间题目自动答题
脚本安装地址:
https://scriptcat.org/zh-CN/script-show-page/4594 (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.体验脚本功能
安装脚本后,需要重新进入学习站点,如果之前已经打开课程学习页面,那么需要刷新页面后脚本才会生效。
# 核心代码
// webtrn.cn机构课程,自动点击确定
function kill_loop_click() {
var time_out = 0;
var count = 0;
setInterval(() => {
if (typeof document.getElementsByClassName("layui-layer-btn0")[0] != "undefined") {
$(".layui-layer-btn0").trigger("click");
console.log("Loop conform cracked [" + count + "] times.");
time_out = 0;
// document.getElementById("container_display").click(); # V 0.1 Bug code.
if ($("#player_pause").css("display") != "none") { // # V 0.1.2 Bug fixed code
$("#player_pause").click();
}
count += 1;
}
console.log("Time elapsed [" + time_out + "s].");
time_out += 1;
}, 1000);
}
if (location.href.indexOf("webtrn.cn") != -1) {
kill_loop_click();
}
// tt.cn机构课程,视频中间题目自动答题
if (location.href.indexOf("ttcn.cn") != -1) {
setInterval(function () {
if (document.querySelector(".ant-modal-content") && document.querySelector(".ant-modal-content").querySelector("input")) {
setTimeout(function () {
document.querySelector(".ant-modal-content").querySelector("input").click()
}, 1000)
setTimeout(function () {
document.querySelector(".ant-modal-content").querySelector("button").click()
}, 2000)
}
}, 5 * 1000)
}
// yanxiu.com机构课程,视频中间题目自动答题
if (location.href.indexOf("yanxiu.com") != -1) {
setInterval(function () {
if (document.querySelector(".question-stem")) {
for (let i = 0; i < document.querySelectorAll(".question-stem").length; i++) {
let item = document.querySelectorAll(".question-stem")[i];
if (isElementVisible(item)) {
setTimeout(function () {
item.querySelector(".label-text").click()
}, 1000)
setTimeout(function () {
document.querySelectorAll(".question button.ivu-btn.ivu-btn-primary")[i].click()
}, 2000)
setTimeout(function () {
document.querySelectorAll(".question button.ivu-btn.ivu-btn-primary")[i].click()
}, 3000)
}
}
}
}, 5 * 1000)
}