mirror of https://github.com/shuang854/Turtle
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
387 B
JavaScript
11 lines
387 B
JavaScript
const IFRAME_HEADERS = ['content-security-policy', 'x-frame-options'];
|
|
const isFirefox = navigator.userAgent.includes('Firefox');
|
|
|
|
chrome.webRequest.onHeadersReceived.addListener(
|
|
(details) => ({
|
|
responseHeaders: details.responseHeaders.filter((header) => !IFRAME_HEADERS.includes(header.name.toLowerCase())),
|
|
}),
|
|
{ urls: ['<all_urls>'] },
|
|
['blocking', 'responseHeaders']
|
|
);
|