fix: 移除课程门数上限,避免与每日积分目标冲突
maxCourses 按整门课计数,而积分按课时计;只剩考试的课会白占名额, 曾出现 5 门用光但今日视频积分只拿到 1/3 就停止的情况。现在只由 今日积分完成、没有可学内容或 budgetMinutes 决定收尾。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
0eb4c40629
commit
f41fc72fe2
20 files changed
+45
-106
No files matched your search
+1
-6
@@ -63,14 +63,13 @@ export const EXPR_SELF_CHECK = `JSON.stringify((function () {
|
||||
};
|
||||
})())`;
|
||||
|
||||
/** 看护循环:判断是否需要注入 / 是否在登录页 / 当前 --max 生效值 */
|
||||
/** 看护循环:判断是否需要注入 / 是否在登录页 */
|
||||
export const EXPR_WATCH = `JSON.stringify({
|
||||
href: location.href,
|
||||
ready: typeof window.__yunXueTangAuto === 'object',
|
||||
onLogin: !!(window.__yunXueTangAuto && window.__yunXueTangAuto.isLoginPage()),
|
||||
hasPwd: !!document.querySelector('input[type=password]'),
|
||||
bodyLen: (document.body && document.body.innerText || '').length,
|
||||
maxCourses: (window.__yunXueTangAuto && window.__yunXueTangAuto.CFG) ? window.__yunXueTangAuto.CFG.maxCourses : null,
|
||||
})`;
|
||||
|
||||
/** 主监控快照:课程、课时、进度、倒计时、视频状态 */
|
||||
@@ -137,10 +136,6 @@ export const EXPR_PAUSE_AND_SAVE = `(function () {
|
||||
return true;
|
||||
})()`;
|
||||
|
||||
/** 把 maxCourses 同步到页面(0 = 不限,必须一并推送) */
|
||||
export const exprSetMaxCourses = (max) =>
|
||||
`(function(){ var a = window.__yunXueTangAuto; if (a && a.CFG) a.CFG.maxCourses = ${Number(max)}; return true; })()`;
|
||||
|
||||
/** 启动 / 接续批量刷课,同时同步「优先短课程」「每日积分」偏好 */
|
||||
export const exprStartBatch = (preferShort, pointsMode) => `(function () {
|
||||
var a = window.__yunXueTangAuto;
|
||||
|
||||
Reference in new issue
Block a user