File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,12 @@ const startCore = () => {
7575} ;
7676
7777const startUpdate = ( ) => {
78- session . defaultSession . webRequest . onBeforeRequest ( { urls : [ 'https://a.invalid/a' ,
78+ const urls = [
7979 oaConfig . noTrack !== false ? 'https://*/api/v9/science' : '' ,
8080 oaConfig . noTyping === true ? 'https://*/api/*/typing' : ''
81- ] . filter ( x => x ) } , ( e , cb ) => cb ( { cancel : true } ) ) ;
81+ ] . filter ( x => x ) ;
82+
83+ if ( urls . length > 0 ) session . defaultSession . webRequest . onBeforeRequest ( { urls } , ( e , cb ) => cb ( { cancel : true } ) ) ;
8284
8385 const startMin = process . argv ?. includes ?. ( '--start-minimized' ) ;
8486
@@ -110,7 +112,7 @@ const startUpdate = () => {
110112 const config = require ( './config' ) ;
111113 if ( oaConfig . setup !== true ) config . open ( ) ;
112114
113- if ( oaConfig . autoupdate !== false ) { // If autoupdate disabled, don't update
115+ if ( oaConfig . autoupdate !== false ) {
114116 try {
115117 require ( './asarUpdate' ) ( ) ;
116118 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments