aboutsummaryrefslogtreecommitdiff
path: root/browser/background.js
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-11-16 16:23:52 +0100
committerVendicated <vendicated@riseup.net>2022-11-16 16:23:52 +0100
commita788813383213ac1257d47f0e9f566dc72750bcb (patch)
treef763f98466400401389b73619a719841631d7cdd /browser/background.js
parente1de6f88fe1db5276cee3df2ef4feeca7fcab850 (diff)
downloadVencord-a788813383213ac1257d47f0e9f566dc72750bcb.tar.gz
Vencord-a788813383213ac1257d47f0e9f566dc72750bcb.tar.bz2
Vencord-a788813383213ac1257d47f0e9f566dc72750bcb.zip
VencordWeb: Migrate to manifest v3
Diffstat (limited to 'browser/background.js')
-rw-r--r--browser/background.js24
1 files changed, 0 insertions, 24 deletions
diff --git a/browser/background.js b/browser/background.js
deleted file mode 100644
index dbe664c..0000000
--- a/browser/background.js
+++ /dev/null
@@ -1,24 +0,0 @@
-if (typeof browser === "undefined") {
- var browser = chrome;
-}
-
-browser.webRequest.onHeadersReceived.addListener(({ responseHeaders, url }) => {
- const cspIdx = responseHeaders.findIndex(h => h.name === "content-security-policy");
- if (cspIdx !== -1)
- responseHeaders.splice(cspIdx, 1);
-
- if (url.endsWith(".css")) {
- const contentType = responseHeaders.find(h => h.name === "content-type");
- if (contentType)
- contentType.value = "text/css";
- else
- responseHeaders.push({
- name: "content-type",
- value: "text/css"
- });
- }
-
- return {
- responseHeaders
- };
-}, { urls: ["*://*.discord.com/*"] }, ["blocking", "responseHeaders"]);