diskort/js/bg.js

19 lines
538 B
JavaScript
Raw Normal View History

2022-03-20 16:13:21 +00:00
/** DisKort
* (c) Er2 2022
* Zlib License
*/
// Disable CSP
function onHeaders(det) {
for (var i = 0; i < det.responseHeaders.length; i++) {
if (det.responseHeaders[i].name.toLowerCase() == 'content-security-policy'
|| det.responseHeaders[i].name.toLowerCase() == 'content-security-policy-report-only'
) det.responseHeaders[i].value = '';
}
return { responseHeaders: det.responseHeaders };
}
chrome.webRequest.onHeadersReceived.addListener(
onHeaders, {urls: ['<all_urls>']}, ['blocking', 'responseHeaders']
);