e11be9a20a531d5b442d8233edb25e2d329a68bf
CI / test (pull_request) Successful in 23s
Viewer fixes (6): - FRAG_LOADING: only set buffering phase when video is actually stalled (paused or readyState < HAVE_FUTURE_DATA), prevents overlay flicker - FRAG_BUFFERED: allow playing transition from any phase except error, require readyState >= 3 and video not paused - Add FRAG_DECRYPTED, FRAG_PARSING_INIT_SEGMENT, FRAG_PARSING_USERDATA event tracking for full fragment pipeline visibility - BUFFER_RESET: also reset segmentsBuffered counter (was missing) - LEVEL_SWITCHED: set phase to 'switching' for accurate UI feedback - Fatal network errors: track in segmentsFailed counter - Add ENDLIST event handler for stream completion detection Detection fixes: - Add filterManifests(): prefer .m3u8 manifest URLs over .ts segments, reconstruct manifest URL from segment paths when needed - Add fallback in scanVideos(): when scrapeFn returns no visible <video> elements (sandboxed iframe), create video entries from intercepted manifest data. Fixes '0 videos detected' issue on Pornhub and similar sites where the video player is in an inaccessible iframe.
Goon Plugin
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 goon_plugin.code-workspace to get the project with recommended extensions pre-installed.