// ==UserScript==
// @name 【💯💯💯2025】网络教育、专业技术、继续教育等视频学习伴侣
// @namespace http://tampermonkey.net/
// @version 6.8.0.1
// @description 后台继续播放📺高倍数🤖自动挂机无人值守🔥继续教育🎗️远程教育,夏邑县小学教师,企安全,甘肃干部,贵州省党员干部网络学院,江西专技学习网,河南省专业技术人员,🦄云南省执业药师协会、湖南师范大学、安徽专技网,教师专业发展培训网,河南教师培训网、建投学堂、山东青年政治学院、云南省执业药师、📕青书学堂、温州继续教育网、👀苏州专业、石家庄铁道大学、华北电力大学、❤河北机电、宁夏专业技术人员、青岛市专业技术人员、黑龙江省网络助学平台、浙里学习、👻云课程、🌈山东干部网络学院,河北教师教育网、🎊东营市继续教育网专业科目培训平台、百年树人、会计人员继续教育🥇深i学、国家智慧教育公共服务平台、济宁市高级职业学校(省级继续教育基地)、基础教育进修网、高等学历继续教育网络学习平台、🐱🚀河南专技在线、青岛大学、和学在线、湖南农民大学生⏩全国煤炭行业现代远程教育培训网❤️浙江文化干部🤖新营造MOOC💯广州市中小学教师继续教育网❤️贵州省建设行业职业技能管理中心、广州市干部培训❤️长春工业大学🎉西安工业大学168网校🥇在线壹佰分🎉一点通🎉上海开放大学🔉专业技术人员继续教育网📺卫生健康人才职业技能培养学习平台✅株洲教师教育网络学院1️⃣安徽专业技术人员🔥广东省教师继续教育信息管理平台🎗️河北干部网络学院↗️西安工业大学🔛江西科技学院、河南华夏基础😉九江学院继续教育学院成教平台🎉国家开放大学,江西专技在线
// @author
// @match *://*/*
// @grant GM_xmlhttpRequest
// @grant GM_openInTab
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_deleteValue
// @grant GM_addValueChangeListener
// @grant window.close
// @grant GM_registerMenuCommand
// @noframes
// @icon https://www.zhihuishu.com/favicon.ico
// @connect www.gaozhiwang.top
// @connect 47.115.205.88
// @connect localhost
// @antifeature payment
// @license MIT
// ==/UserScript==
"use strict";
var __awaiter = this && this.__awaiter || function (e, s, a, r) {
return new (a = a || Promise)(function (n, t) {
function i(e) {
try {
l(r.next(e))
} catch (e) {
t(e)
}
}
function o(e) {
try {
l(r.throw(e))
} catch (e) {
t(e)
}
}
function l(e) {
var t;
e.done ? n(e.value) : ((t = e.value) instanceof a ? t : new a(function (e) {
e(t)
})).then(i, o)
}
l((r = r.apply(e, s || [])).next())
})
};
!function () {
let bserUrl = "";
const panelcss = `
.myTool{
background: #fff;
width: 387px;
font-size: 14px;
display: flex;
flex-direction: column;
align-items: center;
position: fixed;
z-index: 9999;
top: 70px;
left: 44px;
box-sizing: border-box;
padding: 12px 0px;
border-radius: 5px;
box-shadow: 0 0 9px rgba(0,0,0,.5);
}
.controls{
position: absolute;
right: 12px;
font-size: 27px;
top: 9px;
cursor: pointer;
transition: all 0.4s;
}
.controls:hover{
color: #1f74c;
transform: rotate(360deg);
}
.myTool-content{
width: 94%;
transition: all 0.4s;
overflow: hidden;
}
.mytoolkeyipt{
width: 130px;
height: 22px !important;
outline: none;
padding: 0px 3px;
border: 1px solid #757575FF;
border-radius: 3px;
font-size: 13px;
padding: 0px 3px;
margin-right: 5px;
margin-top: 2px;
}
.addkey-btn{
color: #fff;
background: #1f74ca;
}
.removkey-btn{
color: #000;
display: none;
background: #eee;
}
.handleKeyBtn{
width: 54px;
height: 24px;
margin-top: 2px;
border: none;
font-size: 12px;
border-radius: 2px;
cursor: pointer;
}
.handleSpeedUp{
background: orange;
font-size: 12px;
color: #fff;
padding: 4px 15px;
border-radius: 5px;
margin: 0 auto;
max-width: 80px;
margin-top: 10px;
cursor: pointer;
text-align: center;
}
.ctxTipWrap{
min-width: 350px;
min-height: 150px;
text-align: center;
line-height: 150px;
background: #fff;
position: fixed;
z-index: 999;
left: 50%;
top: 50%;
border-radius: 15px;
box-shadow: 0 0 5px rgba(0,0,0,.6);
display:none;
}
.cxtsection{
width: 100%;
box-sizing: border-box;
padding: 0 5px;
margin-bottom: 2px;
}
.cxtsection .ctx-title{
text-align: left;
margin-top: 12px;
font-size: 12px;
color: #4e5969;
border-left: 2px solid #1f74ca;
border-radius: 2px;
padding-left: 3px;
line-height: 16px;
}
.ctxsection2{
display: flex;
justify-content: space-between;
}
.ctxsection2 .speed-select{
width: 50%;
height: 18px !important;
outline: none;
position: relative;
top: 10px;
border: 1px solid #757575FF;
border-radius: 3px;
padding: 0;
padding-left: 10px;
}
.ctxsection3{
display: flex;
align-items: center;
justify-content: space-between;
}
.feedbackBtn{
font-size: 13px;
position: relative;
top: 5px;
cursor: pointer;
color: #000;
}
a{
text-decoration: none;
}
.myTool-pannel_wrap{
border: 1px solid #a99e9e;
height: 100px;
background: rgb(190 203 206);
border-radius: 6px;
margin-top: 6px;
color: #000;
padding: 2px;
box-sizing: border-box;
}
`;
class GMTool {
constructor() {
}
getValue(e) {
return GM_getValue(e, null)
}
setValue(e, t) {
GM_setValue(e, t)
}
openInTab(e) {
GM_openInTab(e, {active: !0})
}
}
const MyTool = new GMTool;
let ElementObj = {}, Internetcourse = {
das01: {
id: 1,
name: "\u5b81\u590f\u4e13\u4e1a\u6280\u672f\u4eba\u5458\u7ee7\u7eed\u6559\u80b2\u5728\u7ebf\u57f9\u8bad\u5e73\u53f0",
mainClass: "CTXCommon",
host: ["gp.chinahrt.com", "videoadmin.chinahrt.com"],
option: {
nodeListClass: ".nb-lession-item",
activeClass: "nb-current-lession-item",
openListenPlayTime: !0,
_init(o) {
return new Promise(e => {
let i = setInterval(() => __awaiter(this, void 0, void 0, function* () {
if (ElementObj.$parentNodes = document.querySelectorAll(".course-list .pr>div"), ElementObj.$parentNodes.length) {
clearInterval(i);
let e = -1;
for (var t of ElementObj.$parentNodes) if ("100%" != t.querySelector(".progress-line span").innerText) {
e = 1, MyTool.setValue("firstHome", location.href), t.querySelector(".bg.pa.tc").click();
break
}
return -1 == e && alert("\u5f53\u524d\u8bfe\u7a0b\u5217\u8868\u5df2\u5168\u90e8\u5b8c\u6210"), !0
}
if (ElementObj.$allTask = document.querySelectorAll("ul.cb.oh li"), ElementObj.$allTask.length) {
clearInterval(i), ElementObj.$handleSpeedUp.style.display = "none";
let e = -1;
for (var n = 0; n <= ElementObj.$allTask.length - 1; n++) if (-1 == ElementObj.$allTask[n].querySelector(".button.titlecolor").innerText.indexOf("\u5df2\u5b66\u5b8c")) {
e = n;
break
}
return -1 == e ? (setTimeout(() => {
location.reload()
}, 2e3), void (location.href = MyTool.getValue("firstHome"))) : (setTimeout(() => {
window.close()
}, 12e4), MyTool.setValue("homeUrl", location.href), void ElementObj.$allTask[e].querySelector(".button.titlecolor").click())
}
var e = document.querySelector("iframe");
-1 == location.href.indexOf("v_video?platformId=") && -1 == location.href.indexOf("/play_video/") || !e || (clearInterval(i), location.href = e.src), -1 != ["/videoPlay/play", "/videoPlay/playEncrypt"].indexOf(location.pathname) && (clearInterval(i), ElementObj.$handleSpeedUp.style.display = "none", o.handleClickSpeedUp())
}), 500)
})
},
playNext() {
return __awaiter(this, void 0, void 0, function* () {
let e = MyTool.getValue("homeUrl");
e ? setTimeout(() => {
location.href = e
}, 1e4) : (showTip("\u5b98\u7f51\u8be5\u5e73\u53f0\u5e95\u90e8\u6709\u6ce8\u610f\u4e8b\u9879,\u8bf7\u6309\u7167\u8be5\u6307\u793a\u9875\u9762\u6267\u884c\u7a0b\u5e8f,\u5426\u5219\u65e0\u6cd5\u81ea\u52a8\u8fde\u64ad", 1e4), alert("\u5b98\u7f51\u8be5\u5e73\u53f0\u5e95\u90e8\u6709\u6ce8\u610f\u4e8b\u9879,\u8bf7\u6309\u7167\u8be5\u6307\u793a\u9875\u9762\u6267\u884c\u7a0b\u5e8f,\u5426\u5219\u65e0\u6cd5\u81ea\u52a8\u8fde\u64ad"))
})
}
}
}
}, speedArr = [1, 2, 3, 5, 10, 16], toolOption = {accelerator: 1, CtxMain: null, SchoolType: -1};
class Main {
constructor() {
this.studentType = 1, this.speedStatus = 0, this.isAdaptive = 1, this.listenVidoeStatusTimer = null, this.init()
}
init() {
}
updateSpeedElement(e) {
0 != this.speedStatus && (ElementObj.$video.playbackRate = e)
}
handleClickSpeedUp(e, t = 0) {
return __awaiter(this, void 0, void 0, function* () {
this.speedStatus = 1, this.isAdaptive = 1, toolOption.CtxMain.play()
})
}
handleChangeCtxSpeed(e) {
var t = speedArr, n = Number(e);
e && t.includes(n) && (toolOption.accelerator = n, localStorage.setItem("_localSpeed", n.toString()), ElementObj.$video) && (ElementObj.$video.playbackRate = n)
}
colletionSchoolData() {
return __awaiter(this, void 0, void 0, function* () {
})
}
listenVidoeStatus(t, n) {
if (t) {
let e = 0;
this.listenVidoeStatusTimer = setInterval(() => {
t.readyState < 4 && 20 <= (e += 1) && location.reload(), t.paused && (e += 1, "function" == typeof n) && (20 <= e ? location.reload() : n())
}, 5e3)
}
}
changeHtml(t) {
return __awaiter(this, void 0, void 0, function* () {
var e;
ElementObj.$ctxstatsbox = document.querySelector(".ctxstatsbox"), ElementObj.$ctxstatsbox || ((e = document.createElement("div")).setAttribute("class", "ctxstatsbox"), e.setAttribute("style", `
width: 100%;
height: 100%;
background: #eae9e9;
position: absolute;
z-index: 999;
overflow: scroll;
top: 0;
padding-left: 10px;
`), t.appendChild(e), yield sleep(300), ElementObj.$ctxstatsbox = document.querySelector(".ctxstatsbox")), this.addInfo("🔉\u521d\u59cb\u5316\u5df2\u5b8c\u6210,\u6b63\u5728\u64ad\u653e")
})
}
addInfo(e, t) {
15 <= document.querySelectorAll(".ctxstatsbox_li").length && (ElementObj.$ctxstatsbox.innerHTML = "");
t = `
${e}`;
ElementObj.$ctxstatsbox.innerHTML += t
}
listenPageHide() {
let t;
document.addEventListener("visibilitychange", () => {
if (document.hidden) {
let e = 0;
t = setInterval(() => {
5 <= (e += 1) && this.addInfo("⚠️⚠️⚠️\u8bf7\u52ff\u957f\u65f6\u95f4\u9690\u85cf\u8be5\u5b66\u4e60\u9875\u9762", 0)
}, 5e3)
} else clearInterval(t)
})
}
pdPlayFn(e) {
var t = MyTool.getValue("spanClassName") || [];
-1 != t.indexOf(e) ? toolOption.CtxMain.play() : (t.push(e), MyTool.setValue("spanClassName", t), this.handleClickSpeedUp())
}
getVideoDom() {
return new Promise(e => {
let t = 0, n = setInterval(() => {
t += 1, ElementObj.$video = document.querySelectorAll("video")[0], ElementObj.$video ? (clearInterval(n), e(1)) : 7 <= t && (clearInterval(n), e(2))
}, 1e3)
})
}
}
let times = 1740125735038;
if (!(3 < ((new Date).getTime() - times) / 1e3 / 60 / 60 / 24)) {
class CTXCommon extends Main {
constructor(e) {
super(), this.taskLength = 0, this.currentIndex = -1, this.nodeListClass = e.nodeListClass, this.activeClass = e.activeClass || "", this.nextClass = e.nextClass || "", this.openListenPlayStatus = "boolean" != typeof e.openListenPlayStatus || e.openListenPlayStatus, this.openListenPlayTime = "boolean" == typeof e.openListenPlayTime && e.openListenPlayTime, this.afterPlayEnd = e.afterPlayEnd, this.getCurrentIndexByOption = e.getCurrentIndexByOption, this.playNext = e.playNext || this.playNext, this.listenRebortFn = e.listenRebortFn, this.getVideoDom = "function" == typeof e.videoEle ? e.videoEle : this.getVideoDom, this.playFn = e.playFn, e._init ? e._init(this) : this._init()
}
_init() {
return __awaiter(this, void 0, void 0, function* () {
let e = setInterval(() => __awaiter(this, void 0, void 0, function* () {
try {
ElementObj.$allTask = document.querySelectorAll(this.nodeListClass), ElementObj.$allTask.length && (ElementObj.$handleSpeedUp.style.display = "none", clearInterval(e), this.getCurrentIndex())
} catch (e) {
}
}), 1e3)
})
}
getCurrentIndex() {
return __awaiter(this, void 0, void 0, function* () {
if (this.getCurrentIndexByOption) this.currentIndex = yield this.getCurrentIndexByOption(); else for (var e = 0; e <= ElementObj.$allTask.length - 1; e++) if (ElementObj.$allTask[e].classList.contains(this.activeClass)) {
this.currentIndex = e;
break
}
-1 == this.currentIndex ? alert("\u5f53\u524d\u8bfe\u7a0b\u6240\u6709\u89c6\u9891\u5df2\u64ad\u653e\u5b8c") : (showTip("✅✅✅\u521d\u59cb\u5316\u5b8c\u6210,5\u79d2\u540e\u5f00\u59cb\u64ad\u653e", 3e3), setTimeout(() => {
this.handleClickSpeedUp()
}, 4e3))
})
}
getCurrentIndex2() {
return __awaiter(this, void 0, void 0, function* () {
ElementObj.$allTask = document.querySelectorAll(".cd-inline-block.two-right li a");
let t = MyTool.getValue("historyData") || null;
var e, n = document.querySelector(".two-active a").innerText;
t && (e = ElementObj.$allTask.values().find(e => {
if (-1 == t.indexOf(e.innerText)) return e
})) && n != e.innerText ? e.click() : this.play()
})
}
getVideoDom() {
return new Promise(e => {
let t = 0, n = setInterval(() => {
t += 1, ElementObj.$video = document.querySelectorAll("video")[0], ElementObj.$video ? (clearInterval(n), e(1)) : 7 <= t && (clearInterval(n), e(2))
}, 1e3)
})
}
play() {
return __awaiter(this, void 0, void 0, function* () {
clearInterval(this.timer), clearInterval(this.listenVidoeStatusTimer), clearInterval(this.listenRebortTime);
var e = yield this.getVideoDom();
this.playFn ? this.playFn(this) : (1 == e && (yield sleep(2e3), ElementObj.$video.volume = 0, ElementObj.$video.play(), this.openListenPlayStatus && this.listenVidoeStatus(ElementObj.$video, () => {
ElementObj.$video.volume = 0, ElementObj.$video.play()
}), this.openListenPlayTime && (yield this.changeHtml(ElementObj.$video.parentElement), this.listenPlayTime()), this.listenRebort(), ElementObj.$video.addEventListener("ended", () => __awaiter(this, void 0, void 0, function* () {
showTip("✅✅✅\u5f53\u524d\u89c6\u9891\u5df2\u64ad\u653e\u5b8c,5\u79d2\u540e\u64ad\u653e\u4e0b\u4e00\u4e2a", 4500), this.playNext(this)
})), ElementObj.$video.addEventListener("pause", () => {
setTimeout(() => {
ElementObj.$video.volume = 0, ElementObj.$video.play()
}, 1500)
})), 2 == e && (showTip("✅✅✅\u8be5\u7ae0\u8282\u4e3a\u6587\u6863,\u5373\u5c06\u81ea\u52a8\u5207\u6362\u4e0b\u4e00\u4e2a", 3e3), yield sleep(3e3), this.playNext()))
})
}
listenRebort() {
this.listenRebortTime = setInterval(() => {
this.listenRebortFn && "function" == typeof this.listenRebortFn && this.listenRebortFn()
}, 1e3)
}
playNext() {
return __awaiter(this, void 0, void 0, function* () {
if (this.currentIndex >= ElementObj.$allTask.length - 1) alert("\u5f53\u524d\u8bfe\u7a0b\u6240\u6709\u89c6\u9891\u5df2\u64ad\u653e\u5b8c"); else {
yield sleep(2500), this.currentIndex += 1;
let e = ElementObj.$allTask[this.currentIndex];
null !== (e = this.nextClass ? ElementObj.$allTask[this.currentIndex].querySelector(this.nextClass) : e) && void 0 !== e && e.click(), this.afterPlayEnd && (yield this.afterPlayEnd()), setTimeout(() => {
this.handleClickSpeedUp()
}, 6e3)
}
})
}
listenPlayTime() {
let n = 0;
this.timer = setInterval(() => __awaiter(this, void 0, void 0, function* () {
n += 1;
var e = null == (e = ElementObj.$video) ? void 0 : e.currentTime, e = (e / 60).toFixed(2),
t = null == (t = ElementObj.$video) ? void 0 : t.duration;
this.addInfo(`\u5df2\u76d1\u6d4b${n}\u6b21,\u5f53\u524d\u72b6\u6001\u6b63\u5728\u5b66\u4e60,\u5df2\u64ad\u653e${e}\u5206\u949f,\u89c6\u9891\u603b\u65f6\u957f\u4e3a${t / 60}\u5206\u949f`)
}), 5e3)
}
saveData(e) {
return new Promise(t => {
fetch("https://nbuild.nxjscx.com.cn:8400/nbuild/trainee/course/lessonTime", {
headers: {
accept: "application/json, text/plain, */*",
"accept-language": "zh-CN,zh;q=0.9",
authorization: "Bearer " + e.token,
"content-type": "application/json;charset=UTF-8",
"sec-ch-ua": '"Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"',
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": '"Windows"',
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin"
},
referrer: "https://nbuild.nxjscx.com.cn:8400/",
referrerPolicy: "strict-origin-when-cross-origin",
body: `{"id":"${e.id}","types":3,"playTime":${e.playTime}}`,
method: "POST",
mode: "cors",
credentials: "include"
}).then(e => e.json()).then(e => t(e))
})
}
myCourseList(e) {
return new Promise(t => {
fetch(`https://nbuild.nxjscx.com.cn:8400/nbuild/trainee/course/myCourseList?subjectId=${e.subjectId}&pageNum=1&pageSize=100`, {
headers: {
accept: "application/json, text/plain, */*",
"accept-language": "zh-CN,zh;q=0.9",
authorization: "Bearer " + e.token,
"content-type": "application/json;charset=utf-8",
"sec-ch-ua": '"Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"',
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": '"Windows"',
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin"
},
referrer: "https://nbuild.nxjscx.com.cn:8400/",
referrerPolicy: "strict-origin-when-cross-origin",
body: null,
method: "GET",
mode: "cors",
credentials: "include"
}).then(e => e.json()).then(e => t(e))
})
}
myLessionList(e) {
return new Promise(t => {
fetch("https://nbuild.nxjscx.com.cn:8400/nbuild/trainee/course/myLessionList?courseId=" + e.courseId, {
headers: {
accept: "application/json, text/plain, */*",
"accept-language": "zh-CN,zh;q=0.9",
authorization: "Bearer " + e.token,
"content-type": "application/json;charset=utf-8",
"sec-ch-ua": '"Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"',
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": '"Windows"',
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin"
},
referrer: "https://nbuild.nxjscx.com.cn:8400/",
referrerPolicy: "strict-origin-when-cross-origin",
body: null,
method: "GET",
mode: "cors",
credentials: "include"
}).then(e => e.json()).then(e => t(e))
})
}
findIsNotDone(l) {
return new Promise(o => __awaiter(this, void 0, void 0, function* () {
var e, t = yield this.myLessionList(l);
let n = [];
t.data.forEach(t => {
if (t.lessions) for (let e = 0; e < t.lessions.length; e++) n.push(t.lessions[e]); else n.push(t)
});
for (e of n) if ("\u8fdb\u884c\u4e2d" == e.studyStatus.name || "\u672a\u5f00\u59cb" == e.studyStatus.name) {
this.addInfo(`\u6b63\u5728\u5b66\u4e60,【${e.title}】`);
var i = {id: e.id, playTime: Math.ceil(e.duration / 1e3), token: l.token};
if (!i.id || !i.playTime) return void alert("\u53c2\u6570\u9519\u8bef");
yield this.saveData(i);
this.addInfo(`🎉🎉🎉\u5b66\u4e60\u5b8c\u6210,${e.title}🎉🎉🎉`), yield sleep(1e3), this.addInfo("\u5373\u5c06\u5f00\u59cb\u5b66\u4e60\u4e0b\u4e00\u4e2a"), yield sleep(2e3)
}
o(!0)
}))
}
}
class Addpanel {
constructor() {
this.$panelWrap = document.createElement("div"), this.$panelStyle = document.createElement("style"), this._init()
}
_init() {
var e;
this.$panelWrap.innerHTML = this.getCTXHTML(), this.$panelStyle.innerHTML = panelcss, null != (e = document.querySelector("head")) && e.appendChild(this.$panelStyle), 3 == toolOption.SchoolType ? null != (e = document.querySelector("#bigContainer")) && e.appendChild(this.$panelWrap) : 7 == toolOption.SchoolType ? null != (e = document.querySelector(".layout-content")) && e.appendChild(this.$panelWrap) : 11 == toolOption.SchoolType ? null != (e = document.querySelector(".task-dashboard-page")) && e.appendChild(this.$panelWrap) : 18 == toolOption.SchoolType ? null != (e = document.querySelector(".screen_wide_1")) && e.appendChild(this.$panelWrap) : null != (e = document.querySelector("body")) && e.appendChild(this.$panelWrap), ElementObj.$title3 = document.querySelector(".title3"), ElementObj.$handleSpeedUp = document.querySelector(".handleSpeedUp"), ElementObj.$playButton = document.querySelector("#playButton"), ElementObj.$ctxTipWrap = document.querySelector("#ctxTipWrap"), ElementObj.$ctxsection2 = document.querySelector(".ctxsection2"), this.optimizePannel(), this.setSpeedOption(), this.addEvent()
}
optimizePannel() {
}
setSpeedOption() {
ElementObj.$speedSelect = document.querySelector("#ctxspeed");
let e = "";
for (var t = 0; t < speedArr.length; t++) {
var n = `
`;
e += n
}
ElementObj.$speedSelect.innerHTML = e;
var i = localStorage.getItem("_localSpeed");
i && (ElementObj.$speedSelect.value = i, toolOption.accelerator = Number(i))
}
handleSetHtml(e) {
try {
ElementObj.$ipt.style.display = "none", ElementObj.$title3.innerText = "\u5f53\u524dkey:", ElementObj.$mytoolkey.innerText = e, ElementObj.$mytoolkey.style.display = "block", ElementObj.$nokey.style.display = "none", ElementObj.$removeKey.style.display = "block", ElementObj.$addKey.style.display = "none", ElementObj.userKey = e
} catch (e) {
}
}
addEvent() {
ElementObj.$handleSpeedUp.addEventListener("click", () => {
toolOption.CtxMain.handleClickSpeedUp()
}), ElementObj.$ctxsection2.addEventListener("change", e => {
toolOption.CtxMain.handleChangeCtxSpeed(e.target.value)
})
}
getCTXHTML() {
return `
`
}
}
function $el(e, t = window.document) {
t.querySelector(e)
}
function sleep(t) {
return new Promise(e => setTimeout(e, t))
}
function fetchData(n) {
new Promise(t => {
try {
GM_xmlhttpRequest(Object.assign(Object.assign({}, n), {
onload: function (e) {
200 == e.status && t(JSON.parse(e.response))
}
}))
} catch (e) {
fetch(n.url, {method: n.method}).then(e => e.json()).then(e => {
t(e)
})
}
})
}
function showTip(e, t = 3500, n) {
t = t || 3500, ElementObj.$ctxTipWrap.style.display = "block", ElementObj.$ctxTipWrap.innerText = e;
setTimeout(() => {
ElementObj.$ctxTipWrap.style.display = "none"
}, t);
n && alert(e)
}
function recognitionType() {
let current_host = location.host;
if (!/www.gaozhiwang.top/.test(current_host)) {
let result = {type: 0, option: null};
for (var key in Internetcourse) Internetcourse[key].host.includes(current_host) && (result.type = 2, "CTXCommon" == Internetcourse[key].mainClass && (result.type = 1, result.option = Internetcourse[key].option), toolOption.CtxMain = eval(Internetcourse[key].mainClass), toolOption.SchoolType = Internetcourse[key].id);
return result
}
}
setTimeout(() => {
var e = recognitionType();
1 == (null == e ? void 0 : e.type) ? toolOption.CtxMain = new CTXCommon(e.option) : toolOption.CtxMain = new toolOption.CtxMain, new Addpanel
}, 3e3)
}
}();