init
This commit is contained in:
commit
6e9e14a817
3 changed files with 149 additions and 0 deletions
11
background.js
Normal file
11
background.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// Strip CSP headers from Yandex Music responses so our video can load
|
||||
browser.webRequest.onHeadersReceived.addListener(
|
||||
(details) => {
|
||||
const headers = details.responseHeaders.filter(
|
||||
(h) => !["content-security-policy", "x-content-security-policy"].includes(h.name.toLowerCase())
|
||||
);
|
||||
return { responseHeaders: headers };
|
||||
},
|
||||
{ urls: ["*://music.yandex.ru/*", "*://music.yandex.com/*"] },
|
||||
["blocking", "responseHeaders"]
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue