bootstrap: add noTyping

This commit is contained in:
Ducko 2022-09-29 15:52:57 +01:00
parent d63646ccfe
commit 5c68a2a78f
1 changed files with 4 additions and 1 deletions

5
src/bootstrap.js vendored
View File

@ -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');