MCPcopy
hub / github.com/ocsjs/ocsjs / getChapterName

Function getChapterName

packages/scripts/src/projects/zhs.ts:1154–1157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1152
1153 const getInfos = () => Array.from(document.querySelectorAll<HTMLElement>('.section-item-collapse-info'));
1154 const getChapterName = () =>
1155 (document.querySelector('.point-title-text')?.textContent || '未知章节') +
1156 '-' +
1157 (document.querySelector('[class*="card-container"].active .video-title')?.textContent || '未知小节');
1158
1159 // 需点击的任务点,其他是是外部链接或者未知任务点
1160 const include_jobs = ['video', 'book', /** 一般是PPT */ 'other', /** 一般是文档 */ 'text'];

Callers 1

doWorkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected