fix: real-time HLS interception via content script (architectural overhaul)
CI / test (pull_request) Canceled after 0s
CI / test (pull_request) Canceled after 0s
Previous approach (DOM snapshot via executeScript) failed on Pornhub because: - Video player loads asynchronously via JavaScript - HLS manifest arrives via XHR/fetch AFTER page render - <video> element only shows blob: URL, not the actual manifest New approach: - Content script injects interceptor into MAIN world at document_start - Interceptor patches XMLHttpRequest and fetch() to capture .m3u8 URLs - Periodic DOM scans detect HLS player instances on <video> elements - Global config object scanning for embedded stream URLs - Popup queries content script via chrome.tabs.sendMessage for real-time data - If no DOM videos found but content script has data, create entries from intercepted sources Changes: - content.js: Full rewrite with main-world injection + XHR/fetch interception - index.js: Query content scripts via messages, merge with DOM snapshot - manifest.json: all_frames + document_start for early injection
This commit is contained in:
1 parent
db52db7799
commit
c22631d1f1
3 files changed
+354
-72
No files matched your search
+2
-1
@@ -27,7 +27,8 @@
|
||||
{
|
||||
"matches": ["<all_urls>"],
|
||||
"js": ["content.js"],
|
||||
"run_at": "document_idle"
|
||||
"run_at": "document_start",
|
||||
"all_frames": true
|
||||
}
|
||||
],
|
||||
"icons": {
|
||||
|
||||
Reference in new issue
Block a user