From 5c68a2a78fef81579644928b85c509d2a80d0ec7 Mon Sep 17 00:00:00 2001 From: CanadaHonk Date: Thu, 29 Sep 2022 15:52:57 +0100 Subject: [PATCH] bootstrap: add noTyping --- src/bootstrap.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bootstrap.js b/src/bootstrap.js index b376ebf..57687e3 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -75,7 +75,10 @@ const startCore = () => { }; const startUpdate = () => { - if (oaConfig.noTrack !== false) session.defaultSession.webRequest.onBeforeRequest({ urls: [ 'https://*/api/v9/science' ] }, async (e, cb) => cb({ cancel: true })); + session.defaultSession.webRequest.onBeforeRequest({ urls: [ + oaConfig.noTrack ? 'https://*/api/v9/science' : '', + oaConfig.noTyping ? 'https://*/api/*/typing' : '' + ].filter(x => x) }, async (e, cb) => cb({ cancel: true })); const startMin = process.argv?.includes?.('--start-minimized');