// ==UserScript==
// @name 【💯💯💯2024】网络教育、专业技术、继续教育等视频学习伴侣
// @namespace http://tampermonkey.net/
// @version 6.7.8.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
// @noframes
// @icon https://www.zhihuishu.com/favicon.ico
// @require https://47.115.205.88:24812/down/1D4lArQruCVI.js
// @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, a, s, r) {
return new (s = s || Promise)(function (i, t) {
function n(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 ? i(e.value) : ((t = e.value) instanceof s ? t : new s(function (e) {
e(t)
})).then(n, o)
}
l((r = r.apply(e, a || [])).next())
})
};
!function () {
if (["havust.jijiaox.login.com"].includes(window.location.host)) {
let n = "http://47.115.205.88", t = "http://www.gaozhiwang.top:7001";
class r {
constructor() {
}
getValue(e) {
return GM_getValue(e, null)
}
setValue(e, t) {
GM_setValue(e, t)
}
openInTab(e) {
GM_openInTab(e, {active: !0})
}
fetchData(i) {
return new Promise(t => {
try {
GM_xmlhttpRequest(Object.assign(Object.assign({}, i), {
onload: function (e) {
200 == e.status && t(JSON.parse(e.response))
}
}))
} catch (e) {
fetch(i.url, {method: i.method}).then(e => e.json()).then(e => {
t(e)
})
}
})
}
sleep(t) {
return new Promise(e => setTimeout(e, t))
}
$el(e, t = window.document) {
t = t.querySelector(e);
return null === t ? void 0 : t
}
}
const d = new r, c = {}, p = {accelerator: 1, CtxMain: null, SchoolType: -1};
var e, i = {
sdf1: {
id: 111,
name: "\u6cb3\u5357\u79d1\u6280\u804c\u4e1a\u5927\u5b66",
mainClass: "CTXCommon",
host: ["havust.jijiaox.com"],
option: {
nodeListClass: ".ml_2 li",
activeClass: "cur",
nextClass: ".littletit",
openListenPlayTime: !1,
getCurrentIndexByOption: () => new Promise(t => {
for (let e = 0; e < c.$allTask.length; e++) {
var i = c.$allTask[e].querySelector(".littlebot").querySelector(".el-progress"),
n = c.$allTask[e].querySelector(".elli").innerText.trim();
if (i && -1 == n.indexOf("\u5728\u7ebf\u4f5c\u4e1a") && -1 == n.indexOf("\u4e60\u9898\u6d4b\u9a8c") && -1 == n.indexOf("Test")) {
t(e);
break
}
}
}),
listenRebortFn: () => {
var e = document.querySelector("._active.elli"),
t = (null == (t = null == e ? void 0 : e.parentElement) ? void 0 : t.parentElement).querySelector(".el-icon-circle-check"),
e = e.innerText.trim();
!t && "\u5728\u7ebf\u4f5c\u4e1a" != e && -1 == e.indexOf("\u4e60\u9898\u6d4b\u9a8c") && -1 == e.indexOf("Test") || p.CtxMain.playNext()
}
}
}
};
let o = [1, 2, 3, 5, 10, 16];
class u extends class {
constructor() {
this.studentType = 1, this.speedStatus = 0, this.isAdaptive = 1, this.listenVidoeStatusTimer = null, this.speedArr = [1, 2, 3, 5, 10, 16], this.init()
}
init() {
this.initPannel()
}
updateSpeedElement(e) {
0 != this.speedStatus && (c.$video.playbackRate = e)
}
handleAddKey(e) {
return __awaiter(this, void 0, void 0, function* () {
c.$ipt.value ? 0 < (yield d.fetchData({
method: "GET",
url: t + "/vertifykey?toolkey=" + c.$ipt.value
})).data.count && (localStorage.setItem("mytoolkey", c.$ipt.value), localStorage.setItem("_localSpeed", p.accelerator.toString()), d.setValue("mytoolkey", c.$ipt.value), e(c.$ipt.value)) : window.open(n)
})
}
handleRemoveKey() {
d.setValue("mytoolkey", null), localStorage.removeItem("mytoolkey"), localStorage.removeItem("_localSpeed"), c.$title3.innerText = "\u7ed1\u5b9akey\uff1a", c.$mytoolkey.style.display = "none", c.$ctxsection2.style.display = "none", c.$nokey.style.display = "block", c.$ipt.style.display = "block", c.$addKey.style.display = "block", c.$removeKey.style.display = "none", c.$handleSpeedUp.style.background = "orange", c.$handleSpeedUp.innerText = "\u70b9\u51fb\u52a0\u901f", this.updateSpeedElement(1)
}
stopSpeedUp() {
this.speedStatus = 0, p.CtxMain.updateSpeedElement(1), c.$handleSpeedUp.style.background = "orange", c.$handleSpeedUp.innerText = "\u70b9\u51fb\u52a0\u901f", l("🔉\u505c\u6b62\u52a0\u901f\u6210\u529f")
}
handleChangeCtxSpeed(e) {
var t, i = localStorage.getItem("mytoolkey");
i ? 0 != this.isAdaptive && (i = this.speedArr, t = Number(e), e) && i.includes(t) && (p.accelerator = t, localStorage.setItem("_localSpeed", t.toString()), c.$video) && (c.$video.playbackRate = t) : window.open(n)
}
listenVidoeStatus(t, i) {
if (t) {
let e = 0;
this.listenVidoeStatusTimer = setInterval(() => {
t.readyState < 4 && 20 <= (e += 1) && location.reload(), t.paused && (e += 1, "function" == typeof i) && (20 <= e ? location.reload() : i())
}, 5e3)
}
}
changeHtml(t) {
return __awaiter(this, void 0, void 0, function* () {
var e;
c.$ctxstatsbox = document.querySelector(".ctxstatsbox"), c.$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 d.sleep(300), c.$ctxstatsbox = document.querySelector(".ctxstatsbox")), this.addInfo("🔉\u521d\u59cb\u5316\u5df2\u5b8c\u6210\uff0c\u6b63\u5728\u64ad\u653e")
})
}
addInfo(e, t) {
15 <= document.querySelectorAll(".ctxstatsbox_li").length && (c.$ctxstatsbox.innerHTML = "");
t = `
${e}`;
c.$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)
})
}
getVideoDom() {
return new Promise(e => {
let t = 0, i = setInterval(() => {
t += 1, c.$video = document.querySelectorAll("video")[0], c.$video ? (clearInterval(i), e(1)) : 7 <= t && (clearInterval(i), e(2))
}, 1e3)
})
}
initPannel() {
var e, t = document.createElement("div"), i = document.createElement("style"),
i = (t.innerHTML = this.getCTXHTML(), i.innerHTML = this.getCTXCSS(), null != (e = document.querySelector("head")) && e.appendChild(i), null != (e = document.querySelector("body")) && e.appendChild(t), c.$title3 = document.querySelector(".title3"), c.$mytoolkey = document.querySelector(".mytoolkey"), c.$nokey = document.querySelector(".nokey"), c.$addKey = document.getElementById("addKey"), c.$removeKey = document.getElementById("removeKey"), c.$ipt = document.querySelector(".mytoolkeyipt"), c.$handleSpeedUp = document.querySelector(".handleSpeedUp"), c.$playButton = document.querySelector("#playButton"), c.$ctxTipWrap = document.querySelector("#ctxTipWrap"), c.$ctxsection2 = document.querySelector(".ctxsection2"), c.$ctxcontrols = document.querySelector(".ctxcontrols"), localStorage.getItem("mytoolkey") || d.getValue("mytoolkey"));
i && this.handleSetHtml(i), this.setSpeedOption(), this.addEvent(), this.getSlogan()
}
setSpeedOption() {
c.$speedSelect = document.querySelector("#ctxspeed");
let e = "";
for (var t = 0; t < o.length; t++) {
var i = `
`;
e += i
}
c.$speedSelect.innerHTML = e;
var n = localStorage.getItem("_localSpeed");
n && (c.$speedSelect.value = n, p.accelerator = Number(n))
}
handleSetHtml(e) {
try {
c.$ipt.style.display = "none", c.$title3.innerText = "\u5f53\u524dkey\uff1a", c.$mytoolkey.innerText = e, c.$mytoolkey.style.display = "block", c.$nokey.style.display = "none", c.$removeKey.style.display = "block", c.$addKey.style.display = "none", c.userKey = e
} catch (e) {
}
}
addEvent() {
c.$addKey.addEventListener("click", () => {
p.CtxMain.handleAddKey(e => {
this.handleSetHtml(e)
})
}), c.$removeKey.addEventListener("click", () => {
p.CtxMain.handleRemoveKey()
}), c.$handleSpeedUp.addEventListener("click", () => {
p.CtxMain.handleClickSpeedUp()
}), c.$ctxsection2.addEventListener("change", e => {
p.CtxMain.handleChangeCtxSpeed(e.target.value)
}), c.$ctxcontrols.addEventListener("click", () => {
var e = document.querySelector(".myTool-content"), t = GM_getValue("hideCtx", null);
t ? (e.style.height = "auto", c.$ctxcontrols.innerText = "×") : (e.style.height = "0px", c.$ctxcontrols.innerText = "🔛", d.$el(".myTool").style.display = "none"), GM_setValue("hideCtx", !t)
}), document.querySelectorAll(".targetHome").forEach(e => {
e.addEventListener("click", () => {
location.href = n
})
})
}
getSlogan() {
d.fetchData({url: t + "/getslogan", method: "GET"}).then(e => {
c.$slogan = document.querySelector("#slogan"), c.$slogan.innerHTML = e.result.text1
})
}
getCTXHTML() {
return `
`
}
getCTXCSS() {
return `
.myTool{
background: #fff;
width: 234px;
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: 15px 9px;
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{
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: 22px !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;
}
`
}
} {
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 : this)._init()
}
_init() {
return __awaiter(this, void 0, void 0, function* () {
let e = setInterval(() => __awaiter(this, void 0, void 0, function* () {
try {
c.$allTask = document.querySelectorAll(this.nodeListClass), c.$allTask.length && (c.$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 <= c.$allTask.length - 1; e++) if (c.$allTask[e].classList.contains(this.activeClass)) {
this.currentIndex = e;
break
}
-1 != this.currentIndex && l("✅✅✅\u521d\u59cb\u5316\u5b8c\u6210\uff0c5\u79d2\u540e\u5f00\u59cb\u64ad\u653e", 3e3)
})
}
getVideoDom() {
return new Promise(e => {
let t = 0, i = setInterval(() => {
t += 1, c.$video = document.querySelectorAll("video")[0], c.$video ? (clearInterval(i), e(1)) : 7 <= t && (clearInterval(i), 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 && (c.$video.volume = 0, c.$video.play(), setTimeout(() => {
c.$video.playbackRate = p.accelerator
}, 3e3), this.openListenPlayStatus && this.listenVidoeStatus(c.$video, () => {
c.$video.volume = 0, c.$video.play()
}), this.openListenPlayTime && (yield this.changeHtml(c.$video.parentElement), this.listenPlayTime()), this.listenRebort(), c.$video.addEventListener("ended", () => __awaiter(this, void 0, void 0, function* () {
l("✅✅✅\u5f53\u524d\u89c6\u9891\u5df2\u64ad\u653e\u5b8c\uff0c5\u79d2\u540e\u64ad\u653e\u4e0b\u4e00\u4e2a", 4500), this.playNext(this)
})), c.$video.addEventListener("pause", () => {
setTimeout(() => {
c.$video.volume = 0, c.$video.play()
}, 1500)
})), 2 == e && (l("✅✅✅\u8be5\u7ae0\u8282\u4e3a\u6587\u6863\uff0c\u5373\u5c06\u81ea\u52a8\u5207\u6362\u4e0b\u4e00\u4e2a", 3e3), yield d.sleep(3e3), this.playNext(this)))
})
}
listenRebort() {
this.listenRebortTime = setInterval(() => {
this.listenRebortFn && "function" == typeof this.listenRebortFn && this.listenRebortFn()
}, 1e4)
}
playNext() {
return __awaiter(this, void 0, void 0, function* () {
if (!(this.currentIndex >= c.$allTask.length - 1)) {
yield d.sleep(2500), this.currentIndex += 1;
let e = c.$allTask[this.currentIndex];
null !== (e = this.nextClass ? c.$allTask[this.currentIndex].querySelector(this.nextClass) : e) && void 0 !== e && e.click(), this.afterPlayEnd && (yield this.afterPlayEnd())
}
})
}
listenPlayTime() {
let i = 0;
this.timer = setInterval(() => __awaiter(this, void 0, void 0, function* () {
i += 1;
var e = null == (e = c.$video) ? void 0 : e.currentTime, e = (e / 60).toFixed(2),
t = null == (t = c.$video) ? void 0 : t.duration;
this.addInfo(`\u5df2\u76d1\u6d4b${i}\u6b21\uff0c\u5f53\u524d\u72b6\u6001\u6b63\u5728\u5b66\u4e60\uff0c\u5df2\u64ad\u653e${e}\u5206\u949f\uff0c\u89c6\u9891\u603b\u65f6\u957f\u4e3a${t / 60}\u5206\u949f`)
}), 5e3)
}
}
function l(e, t = 3500) {
t = t || 3500, c.$ctxTipWrap.style.display = "block", c.$ctxTipWrap.innerText = e;
setTimeout(() => {
c.$ctxTipWrap.style.display = "none"
}, t)
}
for (e in i) if (i[e].host.includes(location.host)) {
var a = i[e].option;
p.SchoolType = i[e].id, p.CtxMain = new u(a);
break
}
var s = Math.floor(9 * Math.random()) + 2;
setTimeout(() => {
document.querySelectorAll(".myTool").length
}, 1e3 * s)
}
}();