chaolucky18/xuexitongScript
Productivity & UtilitiesA browser script that auto-plays Xuexitong course videos and advances lessons for students using the platform.
What it does
This is a userscript/console script for Chaoxing Xuexitong course pages. It handles repetitive playback steps: finding the real video element inside the iframe, calling play(), recovering interrupted playback, continuing muted playback when normal play fails, and moving to the next lesson when a video ends. On pages that land on a "Learning Objectives" step first, it tries to click the top 2视频 / 视频 tab. On chapter quiz pages, it tries to click #prevNextFocusNext to skip forward, with a retry cap to avoid loops README lines 29–36 README lines 37–58 README lines 63–72.
The current V3 script is intentionally narrow: v3_optimized.js is the single source of truth, and the Tampermonkey version is generated from it by a build script README lines 18–26.
A separate DeepSeek console edition calls the DeepSeek API through a local service to recognize quiz questions and assist with answers; it does not change the V3 entry point README lines 13–17.
Quick start
Console method
- Open a Xuexitong course playback page.
- Press
F12and open theConsoletab. - Copy the full contents of v3_optimized.js and paste them into the console, then run.
- After the first run, use
app.run()to start andapp.nextUnit()to jump to the next lesson README lines 75–89 README lines 85–88.
Tampermonkey method
- Install Tampermonkey.
- Import v3_optimized.user.js.
- Confirm the script is enabled.
- Refresh the Xuexitong playback page README lines 90–96.
Default playback configuration includes playbackRate: 1.5, autoplay: true, retryInterval: 2000, maxRetries: 10, videoCheckInterval: 1000, with autoAdvanceNoVideo: false README lines 48–57.
Constraints and known behavior
- The script does not automatically skip unrecognized pages without video by default; this avoids repeatedly triggering the platform's incomplete-task prompt. Run
app.nextUnit()manually, or setapp.configs.autoAdvanceNoVideo = trueonly after confirming the course structure README lines 99–104. AbortErrormessages such as "The play() request was interrupted by a call to pause()" are expected when the player initializes or the page resets playback state; the script tries to resume rather than treating this as failure README lines 105–120.- Running the script repeatedly on the same page stacks listeners and timers, producing duplicate logs. Refresh and run it once, or use the Tampermonkey version without pasting into the console again README lines 121–129.
- Muted playback is intentionally kept muted; the current version does not restore audio after a muted start README lines 130–133.
- After editing
v3_optimized.js, runnode scripts/build-userscript.mjsto regenerate the userscript andnode tests/verify-v3.mjsto check both entry points and confirm the userscript matches the source README lines 148–151. - The repository declares no license. The README states the project is for script debugging, front-end automation research, and page behavior analysis and asks users to follow the target platform's rules README lines 156–158.
HotRepo's take
On the JavaScript daily list dated 2026-11-05, this repository recorded 49 new stars with a best position of 4. That is a single snapshot, not a trend line, but it does indicate sustained attention around course-automation scripts. The project's value is in its deliberately narrow scope: it documents the exact page paths it handles (tab switching, iframe video detection, quiz-page skip selector) and keeps a single source with a build-and-verify step, which makes behavior easier to reason about than a feature-stacked script.
Written by AI from the project's README, updated . The project's own docs are the source of truth.