Skip to content

Расширение: popup-окно вместо Side Panel - #3

Draft
PaperPit wants to merge 7 commits into
mainfrom
cursor/extension-popup-window-8cec
Draft

Расширение: popup-окно вместо Side Panel#3
PaperPit wants to merge 7 commits into
mainfrom
cursor/extension-popup-window-8cec

Conversation

@PaperPit

Copy link
Copy Markdown
Owner

Что сделано

Вместо Chrome Side Panel (сдвигает YouTube влево) UI открывается отдельным popup-окном поверх браузера через chrome.windows.create. Повторный клик фокусирует уже открытое окно.

Также включает фиксы пустой панели / el(null) (версия 1.0.4), т.к. ветка базируется на cursor/fix-sidepanel-blank-8cec.

Связанный Issue

нет (запрос после #1 / #2)

Test plan

  • npm run ext:build
  • Load unpacked → версия 1.0.4
  • YouTube → «Карточки» → отдельное окно, страница не сдвигается
  • Повторный клик фокусирует то же окно

Чеклист

  • Diff по делу
  • sidePanel permission убран из manifest
Open in Web Open in Cursor 

cursoragent and others added 7 commits July 25, 2026 03:11
Load sidepanel.js as a classic IIFE next to the HTML, keep video state
in chrome.storage.local, and surface boot errors in the panel instead of
failing silently before the first paint.

Co-authored-by: PaperPit <PaperPit@users.noreply.github.com>
Object.entries(null) threw before first paint; coerce attrs to {}.

Co-authored-by: PaperPit <PaperPit@users.noreply.github.com>
Removes remaining el(tag, null, ...) call sites that crashed Object.entries
before first paint when an older build was still loaded.

Co-authored-by: PaperPit <PaperPit@users.noreply.github.com>
Replace Chrome Side Panel with chrome.windows popup so YouTube is not
pushed aside; reuse or focus an existing panel window on repeat clicks.

Co-authored-by: PaperPit <PaperPit@users.noreply.github.com>
Replace the floating popup window (which opened as a full tab) with a
fixed overlay panel on YouTube so the page does not shift and no new
tab/window is created.

Co-authored-by: PaperPit <PaperPit@users.noreply.github.com>
YouTube CSP blocks chrome-extension iframes, so the overlay stayed empty.
Bundle the panel UI into the content script and render it in a shadow root.

Co-authored-by: PaperPit <PaperPit@users.noreply.github.com>
Re-inject the YouTube content script via chrome.scripting when the tab
still has a stale script, and show a refresh hint if the context is dead.

Co-authored-by: PaperPit <PaperPit@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants