mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
rewrite science block, also block cloudflare nel & sentry (#317)
* rewrite science block, also block cloudflare nel * Kill unused import
This commit is contained in:
parent
55fd573599
commit
7822317d3a
1 changed files with 6 additions and 4 deletions
|
@ -134,10 +134,12 @@ async function doAfterDefiningTheWindow() {
|
|||
console.log("Starting screenshare module...");
|
||||
import("./screenshare/main");
|
||||
}
|
||||
mainWindow.webContents.session.webRequest.onBeforeRequest((details, callback) => {
|
||||
if (/api\/v\d\/science$/g.test(details.url)) return callback({cancel: true});
|
||||
return callback({});
|
||||
});
|
||||
|
||||
mainWindow.webContents.session.webRequest.onBeforeRequest(
|
||||
{urls: ["https://*/api/v*/science", "https://sentry.io/*", "https://*.nel.cloudflare.com/*"]},
|
||||
(_, callback) => callback({cancel: true})
|
||||
);
|
||||
|
||||
if ((await getConfig("trayIcon")) == "default") {
|
||||
mainWindow.webContents.on("page-favicon-updated", async (event) => {
|
||||
var faviconBase64 = await mainWindow.webContents.executeJavaScript(`
|
||||
|
|
Loading…
Reference in a new issue