济南市会计人员继续教育刷课脚本
济南市会计人员继续教育
# 脚本介绍
该油猴脚本用于 济南市会计人员继续教育 的辅助学习,使用JavaScript编写,适配网址:https://jngate.training.sdufe.edu.cn/
脚本功能如下:
- 视频自动播放 检测视频元素并自动开始播放
- 倍速播放功能 支持1.1倍-2.8倍速播放
- 自动静音功能 自动设置视频为静音状态
- 防暂停机制 监听暂停事件并自动恢复播放
- 自动切课功能 视频播放完毕后自动跳转下一课
- 防检测策略 模拟鼠标移动和键盘操作
脚本安装地址:
暂时下架
如果不会安装脚本,请按照下面安装教程来操作。
# 代学服务
提示
如需代学,请联系客服,支持闲鱼交易。

微信联系:yizhituziang

QQ联系:2422270452
- img: /img/weixin.jpg
name: 微信联系:yizhituziang
- img: /img/qq.jpg
name: QQ联系:2422270452
# 安装教程
# 1.安装浏览器扩展插件
首先需要给我们的浏览器安装上脚本猫插件,这是运行所有用户脚本的基础,如果浏览器已经安装过了脚本猫或者油猴插件,那么可以跳过这一步。推荐使用edge浏览器,安装插件更方便。
浏览器打开网址:https://docs.scriptcat.org/ (opens new window)
这里用edge浏览器作为示范,点击 "添加到Edge浏览器"

接着点击 "获取"

在右上角弹出的窗口,点击 "添加扩展"

等待几秒钟,会提示已经安装好脚本猫插件了。

# 2.安装刷课脚本
打开脚本安装地址后,在页面点击 "安装脚本" 按钮,接着在弹出的窗口点击 "安装" ,之后就会提示"安装成功"。
# 3.体验脚本功能
安装脚本后,需要重新进入学习站点,如果之前已经打开课程学习页面,那么需要刷新页面后脚本才会生效。
# 核心代码
(function() {
'use strict';
console.log('📊 济南市会计人员继续教育刷课脚本已启动');
const CONFIG = {
checkLoopInterval: 900,
videoPlayInterval: 700,
mouseMoveInterval: 22000,
playbackRate: 1.9,
debugMode: false
};
function log(msg) {
if (CONFIG.debugMode) {
console.log(`[济南会计继续教育] ${msg}`);
}
}
function overrideVisibilityAPI() {
const originalAddEventListener = EventTarget.prototype.addEventListener;
EventTarget.prototype.addEventListener = function(type, listener, options) {
if (type === 'visibilitychange' || type === 'blur') {
log(`已拦截 ${type} 事件`);
return;
}
return originalAddEventListener.call(this, type, listener, options);
};
Object.defineProperty(document, 'hidden', {
get: () => false,
configurable: true
});
Object.defineProperty(document, 'visibilityState', {
get: () => 'visible',
configurable: true
});
Object.defineProperty(document, 'webkitHidden', {
get: () => false,
configurable: true
});
Object.defineProperty(document, 'webkitVisibilityState', {
get: () => 'visible',
configurable: true
});
log('页面可见性检测已绕过');
}
function simulateMouseActivity() {
const events = ['mousemove', 'mouseenter', 'mouseover'];
const randomEvent = events[Math.floor(Math.random() * events.length)];
const x = Math.floor(Math.random() * window.innerWidth);
const y = Math.floor(Math.random() * window.innerHeight);
const event = new MouseEvent(randomEvent, {
view: window,
bubbles: true,
cancelable: true,
clientX: x,
clientY: y
});
const element = document.elementFromPoint(x, y);
if (element) {
element.dispatchEvent(event);
}
log(`模拟鼠标活动: ${randomEvent} at (${x}, ${y})`);
}
function findVideo() {
const selectors = [
'video',
'.video-player video',
'#video-area video',
'.course-video video',
'.study-video video',
'video[src]',
'video[id*="video"]'
];
for (const selector of selectors) {
const video = document.querySelector(selector);
if (video) {
return video;
}
}
const iframes = document.querySelectorAll('iframe');
for (const iframe of iframes) {
try {
const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
const video = iframeDoc.querySelector('video');
if (video) {
return video;
}
} catch (e) {
continue;
}
}
return null;
}
function controlVideo(video) {
if (!video) return;
if (video.paused) {
video.play().then(() => {
log('视频已自动播放');
}).catch(err => {
log(`播放失败: ${err.message}`);
});
}
if (video.muted) {
video.muted = false;
}
if (video.playbackRate < CONFIG.playbackRate) {
video.playbackRate = CONFIG.playbackRate;
log(`播放速度设置为 ${CONFIG.playbackRate}x`);
}
video.addEventListener('pause', () => {
log('视频被暂停,尝试恢复');
setTimeout(() => video.play(), 300);
});
video.addEventListener('ended', () => {
log('视频播放完毕,切换下一课');
autoNextChapter();
});
}
function autoNextChapter() {
const nextSelectors = [
'.next-chapter-btn',
'.next-lesson',
'#nextBtn',
'[class*="next"]',
'[id*="next"]',
'a:has(span:contains("下一章"))',
'button:contains("下一节")'
];
for (const selector of nextSelectors) {
const nextBtn = document.querySelector(selector);
if (nextBtn && !nextBtn.disabled) {
log('找到下一章按钮,点击中...');
nextBtn.click();
return;
}
}
const chapters = document.querySelectorAll('.chapter-item, .lesson-item, .course-item');
for (let i = 0; i < chapters.length; i++) {
const chapter = chapters[i];
if (chapter.classList.contains('playing') || chapter.classList.contains('current')) {
if (chapters[i + 1]) {
log('切换到下一章节');
chapters[i + 1].click();
return;
}
}
}
}
function preventSleep() {
setInterval(() => {
if (document.hidden) {
return;
}
const video = findVideo();
if (video && video.paused) {
video.play();
}
}, CONFIG.checkLoopInterval);
}
function init() {
overrideVisibilityAPI();
preventSleep();
setInterval(() => {
const video = findVideo();
if (video) {
controlVideo(video);
}
}, CONFIG.videoPlayInterval);
setInterval(simulateMouseActivity, CONFIG.mouseMoveInterval);
log('济南会计继续教育刷课脚本初始化完成');
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
})();