Repository navigation
Fix image enlarger and minimalist skin on video replay pages; add page title - #1051
Merged
Merged
Conversation
The Aliyun player on contest/problem replay pages renders its progress bar thumb as an <img>, so clicking or dragging it opened the image enlarger. Skip images inside the player container. Closes #1003 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5dr7XTsCeoamqLSiT9rLp
Contributor
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates image-enlarger image filtering to ignore Aliyun video-player thumbnails and progress-bar controls, using both the player class and ID prefix so replay-page controls are not treated as enlargable images while unrelated page images remain unchanged. Sequence diagram for filtering replay video controls from image enlargementsequenceDiagram
participant User
participant ImageEnlarger as InitializeImageEnlarger
participant Image as ImageElement
participant Player as AliyunPlayer
User->>ImageEnlarger: InitializeImageEnlarger()
ImageEnlarger->>Image: closest(.xmoj-image-modal)
ImageEnlarger->>Image: closest(.prism-player, [id^=J_prismPlayer])
alt image is inside video player
ImageEnlarger-->>Image: Skip image enlargement
else unrelated image
ImageEnlarger->>Image: currentSrc or src
ImageEnlarger-->>User: Enable image enlargement
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Deploying xmoj-script-dev-channel with
|
| Latest commit: |
1bb14a7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://86c61176.xmoj-script-dev-channel.pages.dev |
| Branch Preview URL: | https://fix-video-thumb-enlarger.xmoj-script-dev-channel.pages.dev |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The global border-radius/box-shadow reset squared off Aliplayer's round play button ring (showing a grey box), and the global img sizing rule distorted its control icons. Exclude .prism-player descendants from both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5dr7XTsCeoamqLSiT9rLp
…ript-dev/XMOJ-Script into fix-video-thumb-enlarger
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5dr7XTsCeoamqLSiT9rLp
…ript-dev/XMOJ-Script into fix-video-thumb-enlarger
This was referenced Oct 6, 2026
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.
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?:
ApplyEnlargerToImagenow skips images inside the player container (.prism-playeror an element whose id starts withJ_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:
* { border-radius: 0; box-shadow: none }reset squared off the player's round play-button ring (showing a grey box), and its globalimgsizing rule resized the player's control icons. Both rules now exclude.prism-playerdescendants (:not(.prism-player *)).contest_video.php/problem_video.phpnow 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.)
By submitting this pull request, I confirm the following:
🤖 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:
Bug Fixes:
Build: