@@ -193,7 +193,7 @@ chrome.runtime.onMessage.addListener(
193
193
// memento_datetime: window.localStorage.getItem('memento_datetime')
194
194
// })
195
195
} else if ( request . method === 'fetchTimeMap' ) {
196
- fetchTimeMap ( request . value , sender . tab . id )
196
+ fetchTimeMap ( request . value , sender . tab . id , request . urir )
197
197
} else if ( request . method === 'notify' ) {
198
198
chrome . notifications . create (
199
199
'id1' , {
@@ -298,7 +298,7 @@ class ZeroMementos extends Error {
298
298
this . name = this . constructor . name
299
299
}
300
300
}
301
- async function fetchTimeMap ( uri , tabid ) {
301
+ async function fetchTimeMap ( uri , tabid , urir ) {
302
302
log ( `Fetching TimeMap for ${ uri } in tab ${ tabid } ` )
303
303
304
304
fetch ( uri )
@@ -342,10 +342,10 @@ async function fetchTimeMap (uri, tabid) {
342
342
} else if ( err instanceof SyntaxError ) {
343
343
logWithTrace ( "JSON parsing failed, switch up the aggregator" )
344
344
log ( `Previous aggregator endpoint: ${ uri } ` )
345
+ // TODO: obtain URI-R here (don't parse it from URI-T) to send as a param
345
346
chrome . tabs . sendMessage ( tabid , {
346
347
method : 'tryNextAggregator' ,
347
- uri : uri
348
- } , startAgainWithNewAggregatorTempFunctionName )
348
+ uri : urir } )
349
349
}
350
350
} )
351
351
/*
@@ -360,9 +360,6 @@ async function fetchTimeMap (uri, tabid) {
360
360
*/
361
361
}
362
362
363
- function startAgainWithNewAggregatorTempFunctionName ( ) {
364
- console . log ( 'repeating query logic with a new aggregator' )
365
- }
366
363
367
364
function setBadgeText ( value , tabid ) {
368
365
let badgeValue = value
0 commit comments