summarylogtreecommitdiffstats
path: root/disable-x-frame-option-background.js
blob: 7731f4ec4f7c4e288ffc29e3816f843ad4482cb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
chrome.webRequest.onHeadersReceived.addListener(
  function (details) {
    for (var i = 0; i < details.responseHeaders.length; ++i) {
      if (details.responseHeaders[i].name.toLowerCase() == 'x-frame-options') {
        details.responseHeaders.splice(i, 1);
        return {
          responseHeaders: details.responseHeaders
        };
      }
    }
  }, {
    urls: ["<all_urls>"]
  }, ["blocking", "responseHeaders"]
);