feat(inject): add resizable body dock that reparents the video #1

Open
kenng wants to merge 9 commits from feat/reparenting-dock into master
Owner

Why

Users need a full-width theater panel outside the site layout. Fit width expands in place. This control reparents the player into a fixed, resizable dock on document.body, then restores on toggle or controller teardown.

Scope

  • toggleDock / enterDock / exitDock / findDockRoot in inject.js
  • Controller button data-action="dock" (⧉)
  • .vsc-dock* styles in inject.css
  • Version bump to 0.7.4.9

Out of scope: cloning the media element, cross-frame docks into the top page.

Tradeoffs

Reparenting can break host overlay chrome on some players. Cloning was rejected because MSE/blob/DRM streams do not share cleanly.

Blast Radius

Content-script only. One dock at a time. Fit width exits before dock. Risky on heavily nested players; safe to undock.

Verification

On https://x.com/poteto (live <video> blob): injected the dock enter/exit path via CDP. Enter placed the video in a body-child .vsc-dock with placeholder left behind. Exit restored the original parent and cleared session state. Visual check showed the bottom panel with close control and CSS resize handle.

## Why Users need a full-width theater panel outside the site layout. Fit width expands in place. This control reparents the player into a fixed, resizable dock on `document.body`, then restores on toggle or controller teardown. ## Scope - `toggleDock` / `enterDock` / `exitDock` / `findDockRoot` in `inject.js` - Controller button `data-action="dock"` (⧉) - `.vsc-dock*` styles in `inject.css` - Version bump to `0.7.4.9` Out of scope: cloning the media element, cross-frame docks into the top page. ## Tradeoffs Reparenting can break host overlay chrome on some players. Cloning was rejected because MSE/blob/DRM streams do not share cleanly. ## Blast Radius Content-script only. One dock at a time. Fit width exits before dock. Risky on heavily nested players; safe to undock. ## Verification On https://x.com/poteto (live `<video>` blob): injected the dock enter/exit path via CDP. Enter placed the video in a body-child `.vsc-dock` with placeholder left behind. Exit restored the original parent and cleared session state. Visual check showed the bottom panel with close control and CSS resize handle.
Reduce extension privilege by relying on host permissions for tab capture and write-only clipboard copy.

Co-authored-by: Cursor <cursoragent@cursor.com>
Give users a one-click theater panel outside the page layout, with restore on toggle or controller teardown.

Co-authored-by: Cursor <cursoragent@cursor.com>
Always reparent the controller onto the dock and reset its offset so it is not left behind or buried in the player shell.

Co-authored-by: Cursor <cursoragent@cursor.com>
Place the dock in the viewport center. Size the panel so the video area is 96% wide and defaults to 1024px.

Co-authored-by: Cursor <cursoragent@cursor.com>
Let users reposition the dock with a dedicated grab control without fighting the speed controller.

Co-authored-by: Cursor <cursoragent@cursor.com>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/reparenting-dock:feat/reparenting-dock
git switch feat/reparenting-dock

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff feat/reparenting-dock
git switch feat/reparenting-dock
git rebase master
git switch master
git merge --ff-only feat/reparenting-dock
git switch feat/reparenting-dock
git rebase master
git switch master
git merge --no-ff feat/reparenting-dock
git switch master
git merge --squash feat/reparenting-dock
git switch master
git merge --ff-only feat/reparenting-dock
git switch master
git merge feat/reparenting-dock
git push origin master
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
awesome-projects/browser-extension-videospeed!1
No description provided.