河南会计人员继续教育刷课脚本分享
河南会计人员继续教育
嗨,我是脚本喵,2026年一直在捣鼓这些刷课脚本的事儿。河南会计人员继续教育这个平台,会计继续教育的朋友们都知道吧?真的有点磨人。上周,郑州的张会计还跟我吐槽,说这个平台视频动不动就停,切个页面就暂停,太耽误事儿了。
那天下午我正在啃包子,突然想到,这个问题得解决一下。折腾了几个晚上,终于搞出来一个能用的脚本,今天就分享给河南的朋友们。
这个油猴脚本,专门适配河南会计人员继续教育的,网址是 https://hnkj.ghlearning.com/ 。记好哈,别进错网站了。
说一下功能吧,视频能自动播放,暂停限制也给解除了,页面失焦也不会停。弹窗干扰也能自动处理,还能智能盯着学习状态,倍速调节也支持,挺方便的。
脚本安装地址暂时下架了,代学也没问题,闲鱼交易,放心哈。
不会用脚本的别急,下面有详细的教程,跟着一步步来就行。
提示
如需代学,请联系客服,支持闲鱼交易。

微信联系:yizhituziang

QQ联系:2422270452
- img: /img/weixin.jpg
name: 微信联系:yizhituziang
- img: /img/qq.jpg
name: QQ联系:2422270452
跟大家说一下怎么装哈。
得先装脚本猫插件,这个是必须的,要是之前装过油猴或者脚本猫的,那就可以跳过这步。推荐用edge浏览器,装插件真的比谷歌方便太多了。
浏览器打开这个网址 https://docs.scriptcat.org/
用edge浏览器哈,点那个"添加到Edge浏览器"

然后点"获取"

右上角会弹个窗口出来,点"添加扩展"

等个几秒钟,就提示装好了。

然后装刷课脚本,打开安装地址后,点"安装脚本"按钮,弹出来窗口点"安装",就会提示成功了。
装完后,得重新进学习网站,要是之前开着课程页面的,刷新一下脚本就生效了,别忘了哈。
(function() {
'use strict';
console.log('河南会计人员继续教育刷课脚本已加载完成');
const options = {
checkTime: 1800,
enableDebug: true,
autoPlayVideo: true,
stopPause: true,
speedRate: 1.2,
autoNextLesson: true
};
let initialized = false;
function logInfo(msg) {
if (options.enableDebug) {
console.log('[河南会计脚本]', msg);
}
}
function interceptEvents() {
const originalAddEvent = EventTarget.prototype.addEventListener;
EventTarget.prototype.addEventListener = function(eventName, callback, opts) {
const restricted = [
'visibilitychange',
'blur',
'mouseout',
'pagehide',
'focusout'
];
if (restricted.includes(eventName)) {
logInfo('拦截到限制事件: ' + eventName);
return;
}
return originalAddEvent.call(this, eventName, callback, opts);
};
logInfo('事件拦截已设置');
}
function changeVisibility() {
try {
Object.defineProperty(document, 'hidden', {
get: function() { return false; },
configurable: true
});
Object.defineProperty(document, 'visibilityState', {
get: function() { return 'visible'; },
configurable: true
});
if (typeof document.msHidden !== 'undefined') {
Object.defineProperty(document, 'msHidden', {
get: function() { return false; },
configurable: true
});
}
if (typeof document.msVisibilityState !== 'undefined') {
Object.defineProperty(document, 'msVisibilityState', {
get: function() { return 'visible'; },
configurable: true
});
}
logInfo('页面可见性已修改');
} catch (error) {
logInfo('修改失败: ' + error.message);
}
}
function protectWindow() {
window.onblur = null;
window.onfocusout = null;
window.onmouseleave = null;
window.addEventListener('blur', function(e) {
e.stopImmediatePropagation();
e.preventDefault();
return false;
}, true);
window.addEventListener('focusout', function(e) {
e.stopImmediatePropagation();
e.preventDefault();
return false;
}, true);
logInfo('窗口保护已启动');
}
function processVideo(videoEl) {
if (!videoEl) return;
videoEl.muted = false;
videoEl.volume = 0.7;
if (videoEl.paused && options.autoPlayVideo) {
videoEl.play().then(() => {
logInfo('视频已开始播放');
}).catch(err => {
logInfo('播放出错: ' + err);
setTimeout(() => processVideo(videoEl), 1800);
});
}
if (videoEl.playbackRate !== options.speedRate) {
videoEl.playbackRate = options.speedRate;
}
if (options.stopPause) {
videoEl.addEventListener('pause', function() {
logInfo('检测到暂停,尝试恢复');
setTimeout(() => {
if (videoEl.paused) {
videoEl.play();
}
}, 450);
});
}
videoEl.setAttribute('autoplay', 'autoplay');
videoEl.setAttribute('playsinline', '');
}
function findAllVideos() {
const videos = document.querySelectorAll('video');
if (videos.length > 0) {
videos.forEach((video, idx) => {
logInfo('正在处理视频 #' + (idx + 1));
processVideo(video);
});
} else {
const iframes = document.querySelectorAll('iframe');
iframes.forEach(iframe => {
try {
const iframeWin = iframe.contentWindow;
const iframeDoc = iframeWin.document;
const iframeVideos = iframeDoc.querySelectorAll('video');
iframeVideos.forEach(video => processVideo(video));
} catch (e) {
logInfo('iframe无法访问: ' + e);
}
});
}
}
function closeAllDialogs() {
const dialogSelectors = [
'.popup',
'.modal',
'.dialog',
'.alert',
'[class*="popup"]',
'[class*="modal"]',
'[class*="dialog"]'
];
dialogSelectors.forEach(selector => {
const elements = document.querySelectorAll(selector);
elements.forEach(el => {
const closeBtn = el.querySelector(
'.close, .close-btn, [aria-label*="close"], button'
);
if (closeBtn) {
closeBtn.click();
logInfo('已通过按钮关闭弹窗');
} else {
el.style.display = 'none';
el.style.visibility = 'hidden';
el.style.opacity = '0';
}
});
});
}
function startObserver() {
const observer = new MutationObserver((mutations) => {
let videoFound = false;
mutations.forEach(mutation => {
if (mutation.addedNodes.length > 0) {
videoFound = Array.from(mutation.addedNodes).some(node =>
node.tagName === 'VIDEO' ||
(node.querySelectorAll && node.querySelectorAll('video').length > 0)
);
}
});
if (videoFound) {
logInfo('发现新视频元素');
findAllVideos();
}
});
observer.observe(document.body, {
childList: true,
subtree: true
});
logInfo('DOM变化观察器已启动');
}
function simulateUserBehavior() {
const behaviors = ['mousemove', 'keydown', 'click'];
setInterval(() => {
const behavior = behaviors[Math.floor(Math.random() * behaviors.length)];
const event = new Event(behavior, { bubbles: true });
document.dispatchEvent(event);
}, 55000);
logInfo('用户行为模拟已激活');
}
function findNextLesson() {
const buttonSelectors = [
'.next',
'.next-lesson',
'.continue',
'[class*="next"]',
'button:contains("下一节")',
'button:contains("继续")'
];
for (let selector of buttonSelectors) {
const button = document.querySelector(selector);
if (button && button.offsetParent !== null) {
logInfo('找到下一课按钮');
return button;
}
}
return null;
}
function runMainLoop() {
setInterval(() => {
findAllVideos();
closeAllDialogs();
const nextBtn = findNextLesson();
if (nextBtn && options.autoNextLesson) {
logInfo('准备点击下一课');
}
}, options.checkTime);
logInfo('主循环已运行');
}
function initializeScript() {
if (initialized) return;
logInfo('开始初始化脚本...');
interceptEvents();
changeVisibility();
protectWindow();
startObserver();
simulateUserBehavior();
runMainLoop();
initialized = true;
logInfo('脚本初始化完毕!');
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initializeScript);
} else {
initializeScript();
}
window.addEventListener('load', function() {
setTimeout(initializeScript, 1800);
});
})();