@@ -263,8 +263,6 @@ chrome.runtime.onMessage.addListener(
263
263
const resp = await fetch ( submissionURI )
264
264
changeArchiveIcon ( request , response )
265
265
} )
266
- } else if ( request . method === 'tryNextAggregator' ) {
267
- log ( 'TODO: TRYING NEXT AGGREGATOR' )
268
266
} else {
269
267
log ( `Message sent using chrome.runtime not caught: ${ request . method } ` )
270
268
}
@@ -343,10 +341,11 @@ async function fetchTimeMap (uri, tabid) {
343
341
logWithTrace ( 'TODO: switch up the aggregator' )
344
342
} else if ( err instanceof SyntaxError ) {
345
343
logWithTrace ( "JSON parsing failed, switch up the aggregator" )
346
- log ( `Previous aggregator: {aggregator }` )
344
+ log ( `Previous aggregator endpoint: ${ uri } ` )
347
345
chrome . tabs . sendMessage ( tabid , {
348
- method : 'tryNextAggregator'
349
- } )
346
+ method : 'tryNextAggregator' ,
347
+ uri : uri
348
+ } , startAgainWithNewAggregatorTempFunctionName )
350
349
}
351
350
} )
352
351
/*
@@ -361,6 +360,10 @@ async function fetchTimeMap (uri, tabid) {
361
360
*/
362
361
}
363
362
363
+ function startAgainWithNewAggregatorTempFunctionName ( ) {
364
+ console . log ( 'repeating query logic with a new aggregator' )
365
+ }
366
+
364
367
function setBadgeText ( value , tabid ) {
365
368
let badgeValue = value
366
369
0 commit comments