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
40 lines
765 B
JSON
40 lines
765 B
JSON
{
|
|
"manifest_version": 3,
|
|
"name": "Goon Plugin",
|
|
"version": "0.1.0",
|
|
"description": "A Chrome extension",
|
|
"permissions": [
|
|
"storage",
|
|
"tabs",
|
|
"scripting"
|
|
],
|
|
"host_permissions": [
|
|
"<all_urls>"
|
|
],
|
|
"background": {
|
|
"service_worker": "background.js",
|
|
"type": "module"
|
|
},
|
|
"action": {
|
|
"default_popup": "viewer/index.html",
|
|
"default_icon": {
|
|
"16": "icons/icon16.png",
|
|
"48": "icons/icon48.png",
|
|
"128": "icons/icon128.png"
|
|
}
|
|
},
|
|
"content_scripts": [
|
|
{
|
|
"matches": ["<all_urls>"],
|
|
"js": ["content.js"],
|
|
"run_at": "document_start",
|
|
"all_frames": true
|
|
}
|
|
],
|
|
"icons": {
|
|
"16": "icons/icon16.png",
|
|
"48": "icons/icon48.png",
|
|
"128": "icons/icon128.png"
|
|
}
|
|
}
|