Commit Graph
46 Commits
Author SHA1 Message Date
kfj001 6ed6e4277a Update .github/workflows/release.yml
CI / test (pull_request) Successful in 10s
sets specific version to perform releases on
2026-10-07 14:11:50 -07:00
kfj001 62ce7ea788 Merge pull request 'chore: bump version to 0.2.0' (#11) from chore/bump-version-0.2.0 into master
CI / test (push) Successful in 5m45s
Release / release (push) Successful in 23s
Reviewed-on: http://192.168.1.74:30008/kfj001/goon_plugin/pulls/11
Reviewed-by: kfj001 <kfj001@gmail.com>
2026-10-07 13:23:39 -07:00
kfj001 f46285fe4e Merge pull request 'feat(viewer): persist hide/show instructions state in chrome.storage.local' (#10) from feature/durable-instructions-visibility into master
CI / test (push) Successful in 6m18s
Reviewed-on: http://192.168.1.74:30008/kfj001/goon_plugin/pulls/10
Reviewed-by: kfj001 <kfj001@gmail.com>
2026-09-30 18:54:19 -07:00
kfj001 fbc836d9c4 Merge pull request 'ci: make release step idempotent + fix Gitea asset upload' (#9) from feature/gitea-release-workflow into master
CI / test (push) Successful in 5m43s
Release / release (push) Successful in 13s
Reviewed-on: http://192.168.1.74:30008/kfj001/goon_plugin/pulls/9
Reviewed-by: robot <robot@westerntechnologies.duckdns.org>
2026-08-31 10:27:12 -07:00
kfj001 de9d537a75 ci: make release step idempotent + fix Gitea asset upload
CI / test (pull_request) Successful in 5m37s
- resolve-or-create the release by tag to avoid the 409 'Release is has no Tag'
  when a release already exists for the tag (e.g. one made manually in the UI)
- use POST /releases/{id}/assets with multipart field 'attachment'
  (was the obsolete /_attachments route with field 'file')
2026-08-31 00:33:53 -07:00
kfj001 23a3f00df9 Merge pull request 'ci: add tag-based Gitea release workflow + bump to 0.1.1' (#8) from feature/gitea-release-workflow into master
CI / test (push) Successful in 5m32s
Release / release (push) Failing after 13s
Reviewed-on: http://192.168.1.74:30008/kfj001/goon_plugin/pulls/8
2026-08-30 23:57:59 -07:00
kfj001 0a3225035c ci: add tag-based Gitea release workflow + bump to 0.1.1
CI / test (pull_request) Successful in 5m48s
2026-08-30 23:31:12 -07:00
kfj001 0848cd51be Merge pull request 'Add user instructions to goon plugin UI' (#7) from feature/goon-instructions into master
CI / test (push) Successful in 5m39s
Reviewed-on: http://192.168.1.74:30008/kfj001/goon_plugin/pulls/7
Reviewed-by: kfj001 <kfj001@gmail.com>
2026-08-30 21:27:52 -07:00
kfj001 41723227c0 Slight copy update
CI / test (pull_request) Successful in 5m32s
2026-08-31 04:22:12 +00:00
kfj001 c366f0b8c4 Merge pull request 'Rebrand: rename 'goon' -> 'vidplex' + docs' (#6) from rebrand/vidplex-rename-kj into master
CI / test (push) Successful in 5m39s
Reviewed-on: http://192.168.1.74:30008/kfj001/goon_plugin/pulls/6
Reviewed-by: kfj001 <kfj001@gmail.com>
2026-08-30 19:19:26 -07:00
kfj001 64d792632d Merge pull request 'refactor: decouple from site-specific CDN references' (#5) from feature/no_mention_of_pornhub into master
CI / test (push) Successful in 5m34s
Reviewed-on: http://192.168.1.74:30008/kfj001/goon_plugin/pulls/5
Reviewed-by: robot <robot@westerntechnologies.duckdns.org>
2026-08-30 17:07:51 -07:00
kfj001 3e02a6ae74 F1 BLOCKING — walk() cycle detection (src/viewer/index.js:161)
CI / test (pull_request) Successful in 5m41s
Added a per-tree WeakSet visited-guard so the probe terminates. The depth cap alone didn't stop the infinite recursion: window/_parent/_top/frames/_globalObject/_globalProxy are mutually-reachable circular Proxies, so Strategy H's window scan re-walked the same identities along exponentially many paths. The set is declared inside walk (not the outer function) so the separate player trees stay independent. This is what was hanging npm test (exit 124); it now completes in ~15s.
F2 SHOULD-FIX — doc/behavior mismatch (src/background/background.js:299-322)
Reworded the referer-capture comment block. It claimed the referer was read "via onBeforeSendHeaders, which sees the request headers," but the code uses onBeforeRequest + chrome.tabs.get (deriving the referer from the source tab's URL). Now states the actual mechanism and documents why onBeforeSendHeaders+extraHeaders was avoided (extraInfoSpec is rejected by some Chromium builds and fails the whole SW).
F3 SHOULD-FIX — leaked settings file
git rm --cached .claude/settings.local.json and added it to .gitignore. It carried machine-specific absolute paths (/Users/kyle/.claude/...).
F4 FYI — package-lock churn (package-lock.json)
Removed the spurious root "dependencies": { @rollup/rollup-darwin-arm64 } and restored the dev: true / optional: true flags on that platform package so it matches the rest of the @rollup/rollup-* siblings.
F5 FYI — real provider hostnames in test fixtures
Swapped phncdn.com→neutral example.net (registrable-domain sibling test) and thisvid.com→example.com in data_flow/hls_qa/simple_video/referer_proxy test files, rewording comments that named the real sites. src/ and __tests__/ now have zero phncdn/thisvid/pornhub references.
2026-08-30 21:56:05 +00:00
kfj001 ff463c107a fixes broken tests
CI / test (pull_request) Successful in 5m32s
2026-08-30 06:34:44 +00:00
kfj001 bd7d5bfcd0 removes unneeded dependency
CI / test (pull_request) Failing after 5m34s
2026-08-30 05:48:15 +00:00
kfj001 4357ce4094 Fixes issue with pornhub. Removes references.
CI / test (pull_request) Failing after 20s
2026-08-30 04:48:23 +00:00
kfj001 7b43d260a2 Additional fixes
CI / test (pull_request) Successful in 5m42s
2026-08-28 18:03:14 +00:00
kfj001 d3c8c85c58 removes thisvid reference from comment
CI / test (pull_request) Successful in 5m42s
2026-08-28 08:51:49 +00:00
kfj001 62d1244558 additional files 2026-08-28 08:51:27 +00:00
kfj001andClaude 0030d031f1 fix(scan): recover simple <video> detection site-agnostically
The no-mention-of-pornhub branch stopped finding plain <video> elements on
pages like thisvid.com. Two site-agnostic causes, both fixed without any
site-specific references:

1. Predicate over-rejection: isValidManifestUrl (and the nested isManifestUrl
   in m3u8DeepProbeFn) ran the placeholder/`%`/trailing-slash rejections
   BEFORE the concrete media signals. thisvid serves its direct MP4 WITH a
   trailing slash (.../14644093.mp4/?rnd=...), so `path.endsWith('/')`
   rejected a real, fetchable source. Concrete media signals (.mp4/.webm/.ogv/
   .mpd/.m4s/.m3u8/.hlsvod//hls/) now win outright, so a coincidental '%' or
   trailing slash never sinks a real source — while genuine route templates
   (/playlists/, /playlist/%1%/, /videos/{id}/) are still rejected.

2. Runtime cause on ad-iframe-heavy pages: scrapeTab ran only a MAIN-world
   scrape. A MAIN-world + allFrames injection can reject on pages with
   sandboxed/opaque-origin ad iframes, returning 0 videos even when a <video>
   is visible. scrapeTab now falls back to an isolated-world scrape (no `world`
   key — always permitted) when the MAIN-world run finds nothing. The per-frame
   reduction was extracted into a shared reduceScrapeFrames helper.

Adds __tests__/simple_video.test.mjs: a thisvid isValidManifestUrl battery
(trailing-slash MP4 accepted, templates still rejected, %2B/%2F tokens
preserved) plus a structural guard that scrapeTab keeps both a MAIN-world
primary and an isolated-world fallback.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-28 01:17:35 -07:00
kfj001 7139c5ea6f fix(scan): run deep probe/scraper in MAIN world; reject route-template "manifests"
CI / test (pull_request) Successful in 5m48s
The video-detection pipeline was finding nothing on pages that have a bare
<video> element. Two root causes:

1. world: 'MAIN' placement. The deep probe + scraper are injected with
   chrome.scripting.executeScript. Their code (and its own comments) requires
   the MAIN world to see page globals — window.Hls, per-<video> Hls instances,
   video._goon_hls_manifest, and window.__goon_plugin_data (written by the
   main-world interceptors). The calls were missing it, so every main-world
   strategy (A/A2/E/H) found 0. It was also briefly placed inside `target`,
   which chrome.scripting rejects ("Unexpected property: 'world'"); `world` is
   a sibling of `target` on ScriptInjection. Restore it as a sibling of target.

2. fake "manifest" classification. Strategy H was reporting 10 nav links /
   server-side route TEMPLATES as manifests — e.g. /playlists/,
   /playlists/liked/, /playlist/%1%/video/%2%/, /members/%ID%/playlists/ —
   because the old /playlist|/manifest substring check matches nav menus and
   leaves %1%/%ID%/%DIR% template placeholders intact. Those then became the
   stored "video" entries, drowning out the real element.

   isManifestUrl and isValidManifestUrl now reject:
     - dynamic route templates (%NAME% or {name} tokens), using a negative
       lookahead so genuine %-encoded tokens like %2B/%2F are preserved
       (the invariant the codebase explicitly protects),
     - plural collection paths (/playlists, /manifests),
     - trailing-slash directory listings.

   The 'World: ISOLATED' probe log was also misleading (typeof chrome is not a
   world discriminator — the probe provably runs in MAIN); replaced it.

Adds a regression test (hls_qa) reproducing thisvid's pageContext.langUrls
scenario: all 10 templates are rejected while a real .m3u8 carrying a %2B token
is still detected. 90/90 tests pass; 0 lint errors; build OK.
2026-08-25 20:27:14 -07:00
kfj001 e3b904783f fix(proxy): stop per-tab referer wipe and concurrent DNR rule race
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.
2026-08-25 15:35:24 -07:00
kfj001 66c621825f refactor: decouple from site-specific CDN references
CI / test (pull_request) Successful in 37s
The extension had hard-coupled itself to one provider's CDN throughout
background.js and its consumers: a host allowlist, a static
declarativeNetRequest rule that forced a fixed site origin as the Referer,
site-named message types/functions, and illustrative comments naming the
site. This commit removes every reference so the code is generic and
provider-agnostic (and no longer names a specific site for reviewers).

What changed:

  - background.js
      * Dropped the PHNCDN_HOSTS allowlist; video-request capture is now
        host-agnostic (any CDN, driven by isVideoRequest / isHlsManifest).
      * Removed the static DNR rule that forced a fixed site origin as the
        Referer. Replaced with per-tab dynamic capture: an
        onBeforeSendHeaders listener captures the provider's own Referer for
        each video request the live page makes and stores it per CDN host
        (goon_referers). The proxy handler installs a DNR rule scoped to the
        requested host using that captured referer, so the provider's exact
        origin is extracted at runtime instead of hard-coded.
      * Generalized the reconstruction helpers: extractVideoId ->
        extractGroupKey (path-directory key, no /hls/videos/ assumption),
        buildManifestForVariant / reconstructManifestsFromSegments swap a
        segment filename for master.m3u8 dir-agnostically, freshLiveForVideo
        -> freshLiveForGroup, and the GOON_GET_PHNCDN_REQUESTS handler ->
        GOON_GET_VIDEO_REQUESTS. Resolver response key videoId -> groupKey
      * Reworded prose comments to describe behavior generically.

  - manifest.json
      * Added the extraHeaders permission so onBeforeSendHeaders can read the
        Referer header (needed for the dynamic capture above).

  - viewer.js / index.js (consumers)
      * Proxying decision now keys off a learned goon_proxy_hosts set
        (populated from a startup CORS probe) instead of hard-coded host
        substrings; removed the hard-coded CORS ping.
      * filterManifests / isValidManifestUrl generalized (kept the
        .m3u8 / .hlsvod / .ts behavior the tests assert); rank key
        phncdn_reconstructed -> hls_reconstructed; queryPhncdnRequests ->
        queryVideoRequests.

  - content.js, interceptors.js, and two test-prose strings: the illustrative
    "sites like <site>" comments generalized.

Verification: 83/83 tests pass, 0 lint errors. A repo-wide grep for the
previously-referenced host / site now returns no matches. The pre-existing
tsc errors in vite.config.ts are unrelated (present on the prior commit).

Note on the dynamic referer: it works while the source tab is open (it reads
that tab's real Referer); if the tab closed before capturing, the proxy falls
back to a host-derived origin, which a strict origin check may still reject --
the tradeoff of not hard-coding the site.
2026-08-25 02:26:16 -07:00
kfj001 dc2c8092f0 Merge pull request 'Feature/rebrand' (#4) from feature/rebrand into master
CI / test (push) Successful in 27s
Reviewed-on: http://192.168.1.74:30008/kfj001/goon_plugin/pulls/4
Reviewed-by: robot <robot@westerntechnologies.duckdns.org>
2026-08-24 18:42:42 -07:00
kfj001 cb607306bc Reverts plugin changes unrelated to rebranding efforts.
CI / test (pull_request) Successful in 26s
2026-08-24 23:58:57 +00:00
kfj001 7d56e836c9 minor changes to reccomended plugins
CI / test (pull_request) Successful in 25s
2026-08-24 22:53:13 +00:00
kfj001 9420bce9c1 Merge pull request 'fix(tests): stop hls_qa deep-probe suite hanging under jsdom (test-only)' (#3) from fix/jsdom-cycle-hang-hls-qa into master
CI / test (push) Successful in 36s
Reviewed-on: http://192.168.1.74:30008/kfj001/goon_plugin/pulls/3
Reviewed-by: kfj001 <kfj001@gmail.com>
2026-08-24 10:28:08 -07:00
kfj001 7336643ea4 Merge pull request 'feat: full HLS.js support — detection via interceptors + deep probe, playback via hls.js in viewer' (#2) from hls-fix into master
CI / test (push) Failing after 16m10s
Reviewed-on: http://192.168.1.74:30008/kfj001/goon_plugin/pulls/2
Reviewed-by: kfj001 <kfj001@gmail.com>
2026-08-23 18:22:41 -07:00
kfj001 63e5c600dc Adds step to generate artifacts in ci/cd env.
CI / test (pull_request) Successful in 11m30s
2026-08-24 01:10:08 +00:00
kfj001 b6a11d9e46 fixes broken unit test
CI / test (pull_request) Failing after 11m2s
2026-08-23 17:38:14 -07:00
kfj001 c9f49b58d8 Working on pornhub
CI / test (pull_request) Failing after 10m34s
2026-08-20 10:59:05 -07:00
kfj001 001cf146ee Attempted fix at pornhub video
CI / test (pull_request) Failing after 10m39s
2026-08-16 23:00:47 -07:00
kfj001 b234c8dcae fix: HLS playback — CORS proxy for phncdn.com + diagnostic logging
Problem: Even after fixing the hls.js file naming (was 'hls.min.js', now
'hls.js'), videos don't play in the viewer. Likely root cause is CORS
blocking chrome-extension:// requests to phncdn.com CDN URLs that lack
CORS headers for extension origins.

Solution — two-layer fix:

1. Service worker proxy (background.js):
   - New GOON_PROXY_FETCH handler fetches any URL via native fetch()
     (no CORS restrictions in the service worker)
   - Returns base64-encoded response data to the viewer

2. Custom HLS loader (viewer/viewer.js):
   - HlsLoader implements hls.js Loader interface
   - For phncdn.com/pornhubcdn URLs: proxies via GOON_PROXY_FETCH
   - For all other URLs: uses native XHR (bypasses proxy overhead)
   - Config passed to hls.js only when manifest URL needs proxying

3. Diagnostics (viewer/viewer.js):
   - CORS check at page load for phncdn.com and per-video URL
   - Full storage dump of video entries in console
   - Manifest URL logging on each HLS load attempt
   - Proxy activation logging for debugging
2026-08-16 16:42:12 -07:00
kfj001 fa0a0d76cd fix: rename hls.min.js -> hls.js to match vite build output
The vite config outputs 'hls.js' but manifest.json and viewer.js
both referenced 'hls.min.js', causing chrome.runtime.getURL() to
return a 404 — triggering 'HLS player unavailable'.

- Update web_accessible_resources entry in manifest.json
- Update loadHlsJs() chrome.runtime.getURL reference
- Add debug log of manifest URL being loaded for diagnostics
2026-08-16 16:28:55 -07:00
kfj001 509948def1 feat: deep probe strategies G (non-enumerable/Symbol) and H (full window scan)
Strategy G — Independent non-enumerable + Symbol property detection on video elements.
Uses Object.getOwnPropertyNames/Symbols to catch properties hidden by enumerable:false or Symbol keys.
Walks nested objects for URL/levels/config signatures matching HLS instance heuristics.

Strategy H — Full window global enumeration with player-like key filtering.
Catches previously-unknown globals the player wrapper exposes internally.

Content script bridge — merge content-level intercepted manifests into
window.__goon_plugin_data so both interceptors and executeScript share findings.

Add phncdn_reconstructed to dedup priority ranking.
2026-08-16 16:22:07 -07:00
kfj001 877feec731 feat: Strategy 8 — enhance phncdn.com network fallback detection
- Log ALL phncdn.com requests (not just .m3u8) to chrome.storage.local
- Reconstruct manifest URLs from segment URL patterns (/videos/{id}/playlist.m3u8)
- Add GOON_GET_PHNCDN_REQUESTS message handler for popup consumption
- Add queryPhncdnRequests() consumer in viewer/index.js
- Integrate reconstructed manifests into scan pipeline (step 1.6)
2026-08-16 16:17:29 -07:00
kfj001 7416ae8ff9 Merge pull request 'feat: add HLS playback support with hls.js' (#1) from robot/goon_plugin:master into master
CI / test (push) Successful in 24s
Reviewed-on: http://192.168.1.74:30008/kfj001/goon_plugin/pulls/1
2026-08-10 20:50:43 -07:00
kfj001 72d0a2dfe4 Updated gitignore 2026-06-08 20:13:51 +00:00
kfj001andClaude Opus 4.8 6122f67df3 Untrack icons/ — they are build artifacts, not source
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 20:13:19 +00:00
kfj001 93879bc8f7 Updates extensions in workspace. Alters plugin to scrape for NxN tabs for videos to display in the matrix. 2026-06-08 08:40:06 +00:00
kfj001 d5eb687606 Additional claude permissions. Updated devcontainer. 2026-06-08 06:29:25 +00:00
kfj001 c575162437 attempting to get extension to also work on pornhub 2026-05-31 22:55:20 -07:00
kfj001 cf3803806d allow scanning all tabs instead of limiting to 4
- Remove the hardcoded 4-tab limit in the find-videos flow
- Add per-tab try/catch so inaccessible tabs are skipped gracefully
- Filter out tabs that produced no frames from the dedup pipeline
- Update button label and status messages accordingly
2026-05-31 21:06:31 -07:00
kfj001 65fa2bddad scrapes from all open tabs. 2026-05-31 20:20:55 -07:00
kfj001 4a39065d90 core functionality complete 2026-05-31 11:29:51 -07:00
kfj001 f47301c0e4 working state - adds missing resources for chrome load 2026-05-30 13:12:49 -07:00
kfj001 95f5fdd3ea initial commit 2026-05-30 18:51:10 +00:00