东奥会计刷课脚本
东奥会计
# 脚本介绍
该油猴脚本用于 东奥会计 的辅助看课,使用JavaScript编写,适配网址:https://*.dongao.cn/*
脚本功能如下:
1.自动播放 定时检测播放按钮,视频暂停时自动点击播放
2.跳过广告 隐藏广告容器 + 自动点击跳过广告按钮,适配东奥常见广告布局
脚本安装地址:
暂时下架
如果不会安装脚本,请按照下面安装教程来操作。
# 代学服务
提示
如需代学,请联系客服,支持闲鱼交易。

微信联系: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 getCourseKey() {
const url = window.location.href;
// 适配东奥课程URL规则,提取课程/课时ID作为唯一标识
const match = url.match(/course\/(\d+)|lesson\/(\d+)|video\/(\d+)/) || [null, url];
return `dongao_${match[1] || match[2] || match[3] || 'default'}`;
}
// 查找视频核心元素(兼容嵌套iframe)
function getVideoElement() {
// 优先查找主页面视频
let video = document.querySelector('video');
if (video) return video;
// 查找iframe内的视频(部分页面视频嵌套在iframe)
const iframes = document.querySelectorAll('iframe');
for (const iframe of iframes) {
try {
video = iframe.contentDocument?.querySelector('video');
if (video) return video;
} catch (e) { /* 跨域iframe无法访问,忽略 */ }
}
return null;
}
// 查找播放按钮(适配东奥不同播放控件)
function getPlayButton() {
const playSelectors = [
'.vjs-big-play-button', // 视频JS播放器默认按钮
'.play-btn', '.video-play', // 自定义播放按钮
'[aria-label="播放"]', '[data-action="play"]', // 语义化按钮
'.start-play', '.btn-play' // 东奥常见播放按钮类名
];
for (const selector of playSelectors) {
const btn = document.querySelector(selector);
if (btn && btn.offsetParent) return btn; // 排除隐藏按钮
}
return null;
}
// 查找下一集按钮
function getNextEpisodeButton() {
const nextSelectors = [
'.next-lesson', '.next-episode', // 下一课/下一集
'[class*="next"]:not([class*="prev"])', // 包含next但不含prev的元素
'a:contains("下一集")', 'button:contains("下一课")', // 文字匹配
'[data-id="nextLesson"]' // 东奥课时导航属性
];
for (const selector of nextSelectors) {
const btn = document.querySelector(selector);
if (btn && btn.offsetParent) return btn;
}
return null;
}