e3b904783fcf321eb37aac8b5d78ce81cbae944e
CI / test (pull_request) Successful in 28s
Address robot's review on PR #5: - [Blocking] 'goon_referers' is a host-keyed GLOBAL store and must outlive its capture tab; it was wrongly added to the per-tab onRemoved cleanup, so closing any tab wiped referers captured by still-open source tabs (-> 412). It is no longer removed on tab close. Stale referers are now pruned opportunistically in persistReferer via a per-host timestamp + TTL. - [Should-fix] the DNR referer rule used a single shared REFERER_RULE_ID with a non-atomic check+update, so concurrent proxy fetches for two hosts could interleave and leave the wrong host's referer live. Each host now gets its own stable rule id (refererRuleIdFor) and the install+record is serialized per host via an async lock (refererRuleLocks). - [Coverage] add __tests__/referer_proxy.test.mjs exercising the new referer-capture / proxy-host / onRemoved paths: closing a tab preserves goon_referers, two hosts proxied concurrently keep distinct per-host rules, and same-host proxy is idempotent.
VidPlex
A Chrome extension (Manifest V3) that finds videos on the current page and displays them in a 2x2 grid.
Features
- Click the extension icon → "Find Videos" to scan the current tab for all
<video>elements - Videos are listed in the popup for reference (clickable links, "Copy All URLs" button)
- Click "Open Viewer" to open a new window with videos in a 2x2 grid (autoplay muted)
- Click "Clear" to reset the stored video list
Getting started
# 1. Install deps
npm i
# 2. Run in watch mode
npm run dev
# 3. Build for distribution
npm run build
Loading in Chrome
- Open
chrome://extensions/ - Enable Developer mode (top-right)
- Click Load unpacked → select the project root folder (where
manifest.jsonis located)
Project structure
manifest.json — Extension manifest (MV3)
package.json — Dev tooling (Vite + Vitest + TS)
vite.config.ts — Build config
src/
background/ — Service worker (MV3 background)
content/ — Content script
viewer/ — Popup UI + video viewer
index.html — Popup (Find Videos, Open Viewer buttons)
index.js — Popup logic (scans current tab for videos)
index.css — Popup styles
viewer.html — Viewer page (2x2 video grid in new window)
viewer.js — Viewer logic (renders video panels)
viewer.css — Viewer grid styles
icons/ — Extension icons (place .png files here)
Recommended extensions (VS Code)
- Chrome Extension Developer (extension-list-viewer)
- ESLint
- Prettier
VS Code workspace
Open vidplex.code-workspace to get the project with recommended extensions pre-installed.