From 9cd92dc9ba98247628007b57350b3d8cb71efb07 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Wed, 28 Feb 2024 03:57:14 +0800 Subject: [PATCH] chore: modify manifest config. --- chrome-main/background.js | 38 -------------------------------------- chrome-main/manifest.json | 3 --- 2 files changed, 41 deletions(-) delete mode 100644 chrome-main/background.js diff --git a/chrome-main/background.js b/chrome-main/background.js deleted file mode 100644 index 8d53415f..00000000 --- a/chrome-main/background.js +++ /dev/null @@ -1,38 +0,0 @@ - -// chrome.action.onClicked.addListener(tab => { -// chrome.management.getSelf(function (res) { -// // moz-extension://9dc71e1a-5801-b14e-906e-883d3c24d07e/7e4e10b3bb36ac2d03095a183833b2b1.html#/ -// chrome.tabs.create({ url: 'chrome-extension://' + res.id + '/index.html#normal' }); -// }); -// }); - - -// chrome.webRequest.onHeadersReceived.addListener(details => { -// const responseHeaders = details.responseHeaders.map(header => { -// const isCSPHeader = /content-security-policy/i.test(header.name); -// const isFrameHeader = /x-frame-options/i.test(header.name); -// if (isCSPHeader) { -// let csp = header.value -// // csp = csp.replace('script-src', `script-src ${hosts}`) -// // csp = csp.replace('style-src', `style-src ${hosts}`) -// // csp = csp.replace('frame-src', `frame-src ${iframeHosts}`) -// // csp = csp.replace('child-src', `child-src ${hosts}`) -// csp = csp.replace(/frame-ancestors (.*?);/ig, ""); -// // header.value = csp; -// header.value = csp + 'sandbox;'; -// } else if (isFrameHeader) { -// header.value = 'ALLOWALL'; -// } -// return header -// }); -// return { responseHeaders }; -// }, -// { -// urls: ['', '*://*/*'], -// types: ['sub_frame'] -// }, -// [ -// 'blocking', -// 'responseHeaders' -// ] -// ) \ No newline at end of file diff --git a/chrome-main/manifest.json b/chrome-main/manifest.json index 3fad88f7..3de385e9 100644 --- a/chrome-main/manifest.json +++ b/chrome-main/manifest.json @@ -17,9 +17,6 @@ ], "host_permissions": ["https://www.oschina.net/", "https://github.com/"], "manifest_version": 3, - "background": { - "service_worker": "background.js" - }, "offline_enabled": true, "chrome_url_overrides": { "newtab": "index.html"