mirror of
https://github.com/d0zingcat/BroadcastChannel.git
synced 2026-05-17 23:16:48 +00:00
refactor: improve image dimension inference logic
Enhances the algorithm for extracting image dimensions from Telegram widget styles by introducing a more robust fallback mechanism. Previously relied on partial style matching which could miss dimension data encoded across multiple DOM elements. Now checks wrapper elements and padding-top percentage ratios more systematically to synthesize layout dimensions when explicit width/height are unavailable. This ensures more reliable image aspect ratio calculation for content rendering. Also clarifies error messages in the sync workflow and updates code comments from Chinese to English for better maintainability.
This commit is contained in:
4
.github/workflows/sync.yml
vendored
4
.github/workflows/sync.yml
vendored
@@ -35,6 +35,6 @@ jobs:
|
||||
- name: Sync check
|
||||
if: failure()
|
||||
run: |
|
||||
echo "[Error] 由于上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次。"
|
||||
echo "[Error] Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork."
|
||||
echo "[Error] GitHub paused this scheduled sync because the upstream workflow file changed."
|
||||
echo "[Error] Manually sync your fork once to re-enable future automatic updates."
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user