mirror of
https://git.coom.tech/fuckjannies/lolipiss.git
synced 2024-06-26 12:42:38 +00:00
23 lines
842 B
JavaScript
23 lines
842 B
JavaScript
|
const filts = {
|
||
|
urls: ["https://desuarchive.org/*",
|
||
|
"https://arch.b4k.co/*",
|
||
|
"https://kohlchan.net/*"
|
||
|
],
|
||
|
types: ["main_frame", "sub_frame", "csp_report", "object", "other", "ping"]
|
||
|
};
|
||
|
|
||
|
chrome.webRequest.onHeadersReceived.addListener(details => {
|
||
|
const nuke = ['https://arch.b4k.co/', 'https://kohlchan.net/'];
|
||
|
if (nuke.some(u => details.url.startsWith(u)) && details.type == "main_frame") {
|
||
|
const e = details.responseHeaders.findIndex(e => e.name.toLowerCase() == "content-security-policy");
|
||
|
if (e >= 0)
|
||
|
details.responseHeaders[e].value = "";
|
||
|
return {
|
||
|
responseHeaders: [
|
||
|
...details.responseHeaders,
|
||
|
{ name: 'access-control-allow-origin', value: '*' }
|
||
|
]
|
||
|
};
|
||
|
}
|
||
|
}, filts, ['blocking', 'responseHeaders']);
|