Fix image enlarger and minimalist skin on video replay pages; add page title

Merged
BO
2mo ago
+25-4

What does this PR aim to accomplish?:

On contest/problem replay pages (contest_video.php, problem_video.php), clicking or dragging the video progress bar thumb opened the image enlarger, because the Aliyun player renders that thumb as an <img>.

Closes #1003

How does this PR accomplish the above?:

ApplyEnlargerToImage now skips images inside the player container (.prism-player or an element whose id starts with J_prismPlayer). Matching on the container id covers the case where the enlarger runs before the player adds its class. Other images on the page are unaffected.

Also on the replay pages:

  • The minimalist skin's global * { border-radius: 0; box-shadow: none } reset squared off the player's round play-button ring (showing a grey box), and its global img sizing rule resized the player's control icons. Both rules now exclude .prism-player descendants (:not(.prism-player *)).
  • contest_video.php / problem_video.php now get a page title from the page heading (e.g. 回放: Contest 8039: Manacher-TB2401), falling back to 比赛 <cid> 回放.

(The progress bar being hard to drag is a site/player issue — it reproduces with the script disabled — and is not addressed here.)

Note: the enlarger and skin changes were checked in a local harness with the real Aliplayer (play-button ring radius 0px → 100%); the page title is not yet verified on the live page. Item 11 (new UI + classic UI) needs human verification.


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributor's guide, as well as this entire template.
  2. I have commented on my proposed changes within the code.
  3. I have tested my changes.
  4. I am willing to help maintain this change if there are issues with it later.
  5. It is compatible with the GNU General Public License v3.0.
  6. I have squashed any insignificant commits.
  7. I have checked that another pull request for this purpose does not exist.
  8. I have considered and confirmed that this submission will be valuable to others.
  9. I accept that this submission may not be used, and the PR can be closed at the will of the maintainer.
  10. I give this submission freely and claim no ownership to its content.
  11. I have verified that my changes work correctly in both the new UI and the old/classic UI.

  • I have read the above and my PR is ready for review.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E5dr7XTsCeoamqLSiT9rLp

Summary by Sourcery

Fix video replay page interactions and presentation while adding descriptive browser titles.

New Features:

  • Add descriptive page titles to contest and problem video replay pages, with fallbacks when headings are unavailable.

Bug Fixes:

  • Prevent video player control images from opening the image enlarger.
  • Keep minimalist skin styling from distorting video player controls.

Build:

  • Bump the userscript and package versions to 3.8.8.