1 parent
d3c8c85c58
commit
7b43d260a2
3 files changed
+24
-9
No files matched your search
+1
-2
@@ -8,8 +8,7 @@
|
||||
"tabs",
|
||||
"scripting",
|
||||
"webRequest",
|
||||
"declarativeNetRequest",
|
||||
"extraHeaders"
|
||||
"declarativeNetRequest"
|
||||
],
|
||||
"host_permissions": [
|
||||
"<all_urls>"
|
||||
|
||||
Generated
+20
-5
@@ -7,6 +7,9 @@
|
||||
"": {
|
||||
"name": "vidplex",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@rollup/rollup-darwin-arm64": "^4.63.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ajv": "^8.17.1",
|
||||
"ajv-formats": "^3.0.1",
|
||||
@@ -1335,15 +1338,13 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||
"version": "4.60.4",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.4.tgz",
|
||||
"integrity": "sha512-tua0TaJxMOB1R0V0RS1jFZ/RpURFDJIOR2A6jWwQeawuFyS4gBW+rntLRaQd0EQ4bd6Vp44Z2rXW+YYDBsj6IA==",
|
||||
"version": "4.63.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.1.tgz",
|
||||
"integrity": "sha512-FQNqd1lRy/0QhDk3xeRIkSBiCpXCiDnZO3YLVdcDKN1UBiKToNftCzcXYNLshmPDUMlu2TdeS8tGcsU6f3YF1Q==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
]
|
||||
@@ -3422,6 +3423,20 @@
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/rollup/node_modules/@rollup/rollup-darwin-arm64": {
|
||||
"version": "4.60.4",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.4.tgz",
|
||||
"integrity": "sha512-tua0TaJxMOB1R0V0RS1jFZ/RpURFDJIOR2A6jWwQeawuFyS4gBW+rntLRaQd0EQ4bd6Vp44Z2rXW+YYDBsj6IA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
]
|
||||
},
|
||||
"node_modules/rollup/node_modules/@types/estree": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
|
||||
|
||||
@@ -315,7 +315,8 @@ function originFromHost(host) {
|
||||
}
|
||||
|
||||
// Read the `Referer` request header (the browser may title-case it; the
|
||||
// `extraHeaders` option exposes it to MV3 onBeforeSendHeaders).
|
||||
// (onBeforeSendHeaders cannot read request headers in MV3 without a blocking API,
|
||||
// so we fall back to the page origin for hosts that send no referer).
|
||||
function readReferer(headers) {
|
||||
if (!Array.isArray(headers)) return '';
|
||||
for (const h of headers) {
|
||||
@@ -385,7 +386,7 @@ chrome.webRequest.onBeforeSendHeaders.addListener(
|
||||
await persistReferer(host, originFromHost(host));
|
||||
}
|
||||
},
|
||||
{ urls: ['<all_urls>'], extraHeaders: ['Referer'] }
|
||||
{ urls: ['<all_urls>'] }
|
||||
);
|
||||
|
||||
// Install (idempotently) a DNR rule that sets the captured referer for a given
|
||||
|
||||
Reference in new issue
Block a user