Dev - #1373
Conversation
…e crash (#1370) Deep-merge the default configuration into stored settings when loading them on the options page and in the content script, and restore the defaults merge on background load removed in 82047c6. Newly added nested settings (e.g. videosPerRow.videosPerRow) are now always populated, preventing the NumberInput 'Cannot read properties of undefined' crash that stopped the options page from opening.
…retches to Chrome's max canvas Chrome 152 change causes popups to be laid out against a near-max-width canvas instead of shrink-to-fit, so only applying max-width to body left html stretching to ~792px with blank space on the right. Pin the document root to fit-content so the popup renders at the body's content width.
…ed speed (#1372) Forced playback speed was continuously re-enforced on every player state change, so any manual adjustment (settings menu, shift+., scroll wheel, speed buttons) was reverted to the configured value within seconds. Detect user intent via a ratechange listener on the video element and mark a per-video manual override whenever the playback rate changes by anything other than the extension's own enforcement task. While an override is active for the current video, enforcement stands down until the next navigation, where the configured speed applies again. - add playerSpeed/manualOverride.ts: per-video override flag plus a timestamped record of extension-applied rates so enforced writes are never mistaken for user input - makePlayerSpeedTask: no-op while a manual override is active for the current video; retry during the stale-video window instead of writing base speed onto the previous video; record applied rates before writing - restore-on-disable keeps tracking the user's latest choice, including changes made after an override is active Fixes #1372
…le/restore flow - Call ensureTrustedTypesPolicy() once during embedded setup instead of per-feature so all features can safely use HTML sinks on pages that enforce Trusted Types; remove the now-redundant calls from playlistManagementButtons and saveToWatchLaterButton - Wrap enable/movePlayerIntoOverlay/restorePlayer in error handling so a failure no longer leaves the video detached from the page - Remove stale overlays before creating a new one and skip re-detaching when the player is already in the overlay - Fall back to standard player containers when the original parent or placeholder is gone during restore - Guard state API access and size preset parsing against bad saved state Fixes the mini player never appearing and the video disappearing when scrolling to comments, caused by innerHTML assignment throwing under YouTube's Trusted Types CSP.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
WalkthroughThe pull request updates contribution branching guidance, centralizes Trusted Types setup, hardens mini-player recovery, improves playback-speed enforcement and manual override tracking, and sets popup width to fit-content. ChangesContribution guidance
Trusted Types setup
Mini-player recovery
Playback-speed control
Popup sizing
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant playerSpeed
participant HTMLVideoElement
participant manualOverride
participant PersistedState
playerSpeed->>HTMLVideoElement: wait for matching video ID
playerSpeed->>manualOverride: check active manual override
playerSpeed->>HTMLVideoElement: apply effective playback rate
playerSpeed->>manualOverride: record extension-applied rate
HTMLVideoElement->>playerSpeed: emit ratechange
playerSpeed->>PersistedState: persist external or manual rate
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🎉 This PR is included in version 1.34.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary by CodeRabbit
New Features
Bug Fixes
Documentation