Repository navigation
专注模式:换视频和读取失败的判断抽成函数并补表格测试 - #434
Merged
Merged
Conversation
isOtherClip、clipChangeAction、readFailureAction、clipFields / clipPage 不碰 DOM,content.selftest.js 逐行覆盖;等待和世代号的代码不动,行为不变。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改了什么
content.js里换视频之后怎么办的几个判断夹在 await、DOM 和 chrome 调用中间,这一块改动最多(近 60 个提交)。抽成不碰 DOM 的函数,content.selftest.js逐行覆盖:isOtherClip:换了视频,或 cid 已知时换了分 P。clipChangeAction:专注模式开着重读,带mdg_reader进专注模式,否则不动。readFailureAction:旧的读取失败忽略;视频信息读到了、不是限流时降级成无字幕;其余报错。clipFields/clipPage:视频信息怎么合并;pageIndex/pageCount的限幅和buildSidepanelContext共用。等待和世代号的代码不动,行为不变。
验证
node scripts/selftest.mjs:39 个通过。去掉 cid 未知的保护或!alive,测试失败。mdg_reader的地址。