Repository navigation
专注模式:同一时间开头的两章,高亮跟着时间走到下一章 - #432
Merged
Merged
Conversation
简介里写的章节没有结束时间,两行时间相同时,专注模式以前一直高亮第一章,笔记却分得对。章节到哪结束改由 sites.js chapterRanges 一处算,专注模式和笔记共用。
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.
改了什么
简介里写的章节(YouTube)没有结束时间。两行时间戳相同、标题不同时,专注模式以前一直高亮第一章到视频结束,笔记却分得对:两处各自算「这一章到哪结束」,规则不一样。
现在由
MdgSites.chapterRanges一处算:下一个开始时间更晚的章节的开头,否则这一章自己的to,否则到结尾。专注模式和笔记共用。验证
node scripts/selftest.mjs:39 个通过。新加的 content 测试(A、B 同在 0 秒,C 在 60 秒,都没有结束时间)在旧规则下失败。MdgSites.chapterRanges:上面那组章节第 10 秒在 A,第 90 秒在 C。