From fe1949acf3339617cc55d6f7e8395b0694b56789 Mon Sep 17 00:00:00 2001 From: robot Date: Wed, 12 Aug 2026 04:47:47 +0000 Subject: [PATCH] fix: refactor HLS detection pipeline to restore dropped strategies - Add Strategy E to m3u8DeepProbeFn: read __goon_plugin_data.manifests from main-world interceptors (was accidentally dropped during refactoring) - Re-add content script query in scanVideos: restores poster URL extraction (og:image, twitter:image) and secondary manifest source from content.js - Extend interceptor Hls.js polling from 3s to 30s + add MutationObserver fallback for dynamically-loaded players - Restore allFrames:true in scrapeTab: catches iframe-hosted video players (e.g. Pornhub embeds player in nested iframes) - Prefer interceptor-collected manifests over inline-script scraps in both dedupManifests sort order and scrapeFn Priority 5 fallback --- src/inject/interceptors.js | 36 +++- src/viewer/index.js | 125 ++++++++++-- src/viewer/viewer.js | 400 +++++++++++++++++++++++++++++++++++-- 3 files changed, 522 insertions(+), 39 deletions(-) diff --git a/src/inject/interceptors.js b/src/inject/interceptors.js index 7f93ef2..0702684 100644 --- a/src/inject/interceptors.js +++ b/src/inject/interceptors.js @@ -120,13 +120,14 @@ // Patch immediately if HLS is already defined patchHlsPrototype(); - // Watch for HLS.js to be dynamically defined later — use MutationObserver - // on the for script tags that load hls.js, as a more reliable fallback - // than Object.defineProperty (which conflicts with page JS). + // Watch for HLS.js to be dynamically defined later. + // Use a combination of: + // 1. Longer polling window (30s instead of 3s) to catch lazy-loaded players. + // 2. MutationObserver on for new